nbd/nbd_rpc: Fix memory leak of an error path.
here we can see that an error rpc response returns. need to free the rpc nbd start req. Signed-off-by: yidong0635 <dongx.yi@intel.com> Change-Id: Iebc7cb416c691e8cd48a997f65bff664d9026657 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5635 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Community-CI: Mellanox Build Bot
This commit is contained in:
parent
43607106b1
commit
0dc567eb2d
@ -158,6 +158,7 @@ rpc_start_nbd_done(void *cb_arg, struct spdk_nbd_disk *nbd, int rc)
|
|||||||
|
|
||||||
if (rc) {
|
if (rc) {
|
||||||
spdk_jsonrpc_send_error_response(request, rc, spdk_strerror(-rc));
|
spdk_jsonrpc_send_error_response(request, rc, spdk_strerror(-rc));
|
||||||
|
free_rpc_nbd_start_disk(req);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user