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> Change-Id: If84317c67626a3193851c90be056b8550a5fccee Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1916 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
7fbdeacc9e
commit
f955c75ef4
@ -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