lib/nvme: free io buffer for nvme_io_msg
This buffer was not released after failure to enqueue.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1916 (master)
(cherry picked from commit f955c75ef4
)
Change-Id: If84317c67626a3193851c90be056b8550a5fccee
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2161
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
b8446bb66d
commit
6fe32e3e17
@ -64,6 +64,7 @@ nvme_io_msg_send(struct spdk_nvme_ctrlr *ctrlr, uint32_t nsid, spdk_nvme_io_msg_
|
||||
rc = spdk_ring_enqueue(ctrlr->external_io_msgs, (void **)&io, 1, NULL);
|
||||
if (rc != 1) {
|
||||
assert(false);
|
||||
free(io);
|
||||
pthread_mutex_unlock(&ctrlr->external_io_msgs_lock);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user