iser-target: Fix leak on failure in isert_conn_create_fastreg_pool
This patch fixes a memory leak for fr_desc upon failure of
isert_create_fr_desc() in isert_conn_create_fastreg_pool()
code.
As reported by Coverity 1166659:
*** CID 1166659: Resource leak (RESOURCE_LEAK)
/drivers/infiniband/ulp/isert/ib_isert.c: 470 in isert_conn_create_fastreg_pool()
464 isert_conn, isert_conn->conn_fr_pool_size);
465
466 return 0;
467
468 err:
469 isert_conn_free_fastreg_pool(isert_conn);
>>> CID 1166659: Resource leak (RESOURCE_LEAK)
>>> Variable "fr_desc" going out of scope leaks the storage it points to.
470 return ret;
471 }
472
473 static int
474 isert_connect_request(struct rdma_cm_id *cma_id, struct rdma_cm_event *event)
475 {
Cc: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Loading
Please register or sign in to comment