When create srq, it needs to allocate the enough buffer space for storing srqwqe. if allocate fail, it needs to free some memory source have created successful. Here fixes the bug with freeing bitmap of idx queue. Fixes: 22d53621d9b0 ("libhns: Add verb of creating srq for hip08 user mode") Signed-off-by: Lijun Ou <oulijun@xxxxxxxxxx> --- providers/hns/hns_roce_u_verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/providers/hns/hns_roce_u_verbs.c b/providers/hns/hns_roce_u_verbs.c index 6f54066..aa791e0 100644 --- a/providers/hns/hns_roce_u_verbs.c +++ b/providers/hns/hns_roce_u_verbs.c @@ -573,7 +573,7 @@ err_srq_buf: hns_roce_free_buf(&srq->buf); err_idx_que: - free(&srq->idx_que.bitmap); + free(srq->idx_que.bitmap); hns_roce_free_buf(&srq->idx_que.buf); out: free(srq); -- 2.8.1