Commit 6c23277d authored by Peng Lian's avatar Peng Lian Committed by Tomasz Zawadzki
Browse files

ctrlr/nvmf: free aer should check these qpair has non-nullptr ctrlr



When calling spdk_nvmf_transport_stop_listen_async without specified
subsystem, these qpairs wihth nullptr ctrlr should be skipped to free
aer. Otherwise there might be an access-nullptr problem.

Change-Id: I82fcf7178c241f59189a133424f9e5779e7497c0
Signed-off-by: default avatarPeng Lian <peng.lian@smartx.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/22258


Community-CI: Mellanox Build Bot
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <jim.harris@samsung.com>
parent 1c733603
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3900,7 +3900,7 @@ nvmf_qpair_free_aer(struct spdk_nvmf_qpair *qpair)
	struct spdk_nvmf_ctrlr *ctrlr = qpair->ctrlr;
	int i;

	if (!nvmf_qpair_is_admin_queue(qpair)) {
	if (ctrlr == NULL || !nvmf_qpair_is_admin_queue(qpair)) {
		return;
	}