Skip to content

Commit fb448ce

Browse files
Leon Romanovskyjgunthorpe
authored andcommitted
RDMA/core: Free DIM memory in error unwind
The memory allocated for the DIM wasn't freed in in error unwind path, fix it by calling to rdma_dim_destroy(). Fixes: da66297 ("RDMA/core: Provide RDMA DIM support for ULPs") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Leon Romanovsky <[email protected]> Reviewed-by: Max Gurtovoy <[email protected] <mailto:[email protected]>> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent 5d46b28 commit fb448ce

File tree

1 file changed

+1
-0
lines changed
  • drivers/infiniband/core

1 file changed

+1
-0
lines changed

drivers/infiniband/core/cq.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,7 @@ struct ib_cq *__ib_alloc_cq_user(struct ib_device *dev, void *private,
275275
return cq;
276276

277277
out_destroy_cq:
278+
rdma_dim_destroy(cq);
278279
rdma_restrack_del(&cq->res);
279280
cq->device->ops.destroy_cq(cq, udata);
280281
out_free_wc:

0 commit comments

Comments
 (0)