lib/nvme: fix do not use external_io_msg_qpair after free

Change-Id: I20ef8303c2fae6abf43d15ebb025ea368c0dfd67
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473282
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
Tomasz Kulasek 2019-11-05 12:55:47 +01:00 committed by Tomasz Zawadzki
parent e79a29b264
commit 53184430a5

View File

@ -166,6 +166,7 @@ nvme_io_msg_ctrlr_stop(struct spdk_nvme_ctrlr *ctrlr, struct nvme_io_msg_produce
if (ctrlr->external_io_msgs_qpair) {
spdk_nvme_ctrlr_free_io_qpair(ctrlr->external_io_msgs_qpair);
ctrlr->external_io_msgs_qpair = NULL;
}
pthread_mutex_destroy(&ctrlr->external_io_msgs_lock);