diff --git a/providers/bnxt_re/verbs.c b/providers/bnxt_re/verbs.c index be1f43305..c7e6e6d9b 100644 --- a/providers/bnxt_re/verbs.c +++ b/providers/bnxt_re/verbs.c @@ -849,10 +849,9 @@ static int bnxt_re_alloc_queue_ptr(struct bnxt_re_qp *qp, if (!attr->srq) { qp->jrqq = calloc(1, sizeof(struct bnxt_re_joint_queue)); - if (!qp->jrqq) { - free(qp->jsqq); + if (!qp->jrqq) goto fail; - } + qp->jrqq->hwque = calloc(1, sizeof(struct bnxt_re_queue)); if (!qp->jrqq->hwque) goto fail;