Commit f75f0a0a authored by Mustafa Ismail's avatar Mustafa Ismail Committed by Greg Kroah-Hartman

i40iw: Fix double free of allocated_buffer

commit d41d0910 upstream.

Memory allocated for iwqp; iwqp->allocated_buffer is freed twice in
the create_qp error path. Correct this by having it freed only once in
i40iw_free_qp_resources().

Fixes: d3749841 ("i40iw: add files for iwarp interface")
Signed-off-by: default avatarMustafa Ismail <mustafa.ismail@intel.com>
Signed-off-by: default avatarShiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 296fe7f0
...@@ -794,7 +794,6 @@ static struct ib_qp *i40iw_create_qp(struct ib_pd *ibpd, ...@@ -794,7 +794,6 @@ static struct ib_qp *i40iw_create_qp(struct ib_pd *ibpd,
return &iwqp->ibqp; return &iwqp->ibqp;
error: error:
i40iw_free_qp_resources(iwdev, iwqp, qp_num); i40iw_free_qp_resources(iwdev, iwqp, qp_num);
kfree(mem);
return ERR_PTR(err_code); return ERR_PTR(err_code);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment