Skip to content

Commit

Permalink
providers/bnxt_re: Fix memory leak
Browse files Browse the repository at this point in the history
Avoid memory leak in bnxt_re_create_cq() by freeing "cq->mem".

Fixes: d035125 ("bnxt_re/lib: Refactor CQ create verb implementation")
Signed-off-by: Kamal Heib <kheib@redhat.com>
  • Loading branch information
Kamalheib committed Jan 20, 2025
1 parent fb71cfe commit 81e248f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion providers/bnxt_re/verbs.c
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ struct ibv_cq *bnxt_re_create_cq(struct ibv_context *ibvctx, int ncqe,
*/
cq->cqq->va = cq->mem->va_head;
if (!cq->cqq->va)
goto fail;
goto cmdfail;

pthread_spin_init(&cq->cqq->qlock, PTHREAD_PROCESS_PRIVATE);

Expand Down

0 comments on commit 81e248f

Please sign in to comment.