Skip to content

bnxt_re: Free GSI QP header buffers on QP1 create failure#2250

Open
lhx2000 wants to merge 1 commit into
freebsd:mainfrom
lhx2000:free-hdr-buf
Open

bnxt_re: Free GSI QP header buffers on QP1 create failure#2250
lhx2000 wants to merge 1 commit into
freebsd:mainfrom
lhx2000:free-hdr-buf

Conversation

@lhx2000

@lhx2000 lhx2000 commented Jun 2, 2026

Copy link
Copy Markdown

bnxt_re_create_gsi_qp() allocates SQ/RQ header buffers with bnxt_qplib_alloc_hdr_buf() before creating the hardware QP1. If bnxt_qplib_create_qp1() fails, the function returns without freeing those header buffers, leaking the memory owned by qplqp->sq_hdr_buf and qplqp->rq_hdr_buf.

Free the header buffers on the QP1 create error path before returning.

bnxt_re_create_gsi_qp() allocates SQ/RQ header buffers with
bnxt_qplib_alloc_hdr_buf() before creating the hardware QP1.
If bnxt_qplib_create_qp1() fails, the function returns without
freeing those header buffers, leaking the memory owned by
qplqp->sq_hdr_buf and qplqp->rq_hdr_buf.

Free the header buffers on the QP1 create error path before
returning.

Signed-off-by: Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant