Skip to content

Commit

Permalink
providers/bnxt_re: Fix memory leak
Browse files Browse the repository at this point in the history
[ Upstream commit 81e248f ]

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>
Signed-off-by: Nicolas Morey <nmorey@suse.com>
  • Loading branch information
Kamalheib authored and nmorey committed Jan 22, 2025
1 parent 7aae78b commit bdf5c7e
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 @@ -355,7 +355,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 bdf5c7e

Please sign in to comment.