+3
−1
+4
−0
Loading
Some memory alloc in nvme_allocate_request_user_copy, and submit through nvme_qpair_submit_request, if nvme ctrlr is failed or qpair state not meet the requirements, submit will return -ENXIO, and call nvme_free_request(), but it will not free req->payload.contig_or_cb_arg, those memory only gets freed when the request is actually completed, through nvme_user_copy_cmd_complete(). Let's fix this by add check when submit failed. Fixes issue #2832 Change-Id: I54f0fc60dbb53ced9f52da7d89017be13db2eee1 Signed-off-by:Fengnan Chang <changfengnan@bytedance.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15985 Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by:
Changpeng Liu <changpeng.liu@intel.com> Reviewed-by:
Xiaodong Liu <xiaodong.liu@intel.com> Reviewed-by:
Jim Harris <james.r.harris@intel.com>