summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/i40iw/i40iw_verbs.c
diff options
context:
space:
mode:
authorMustafa Ismail <mustafa.ismail@intel.com>2016-08-23 16:50:13 -0500
committerDoug Ledford <dledford@redhat.com>2016-08-24 11:31:39 -0400
commitd41d0910d97f05be987d2d60de7e8685c108963b (patch)
tree2acd1fa15ed66fe063c4909bbeb6e3598dad6622 /drivers/infiniband/hw/i40iw/i40iw_verbs.c
parent82d200cc6fc817dbf049b67e5e3215eab427e846 (diff)
downloadblackbird-op-linux-d41d0910d97f05be987d2d60de7e8685c108963b.tar.gz
blackbird-op-linux-d41d0910d97f05be987d2d60de7e8685c108963b.zip
i40iw: Fix double free of allocated_buffer
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: d37498417947 ("i40iw: add files for iwarp interface") Signed-off-by: Mustafa Ismail <mustafa.ismail@intel.com> Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/i40iw/i40iw_verbs.c')
-rw-r--r--drivers/infiniband/hw/i40iw/i40iw_verbs.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/i40iw/i40iw_verbs.c b/drivers/infiniband/hw/i40iw/i40iw_verbs.c
index 2360338877bf..722e5af1e3d8 100644
--- a/drivers/infiniband/hw/i40iw/i40iw_verbs.c
+++ b/drivers/infiniband/hw/i40iw/i40iw_verbs.c
@@ -794,7 +794,6 @@ static struct ib_qp *i40iw_create_qp(struct ib_pd *ibpd,
return &iwqp->ibqp;
error:
i40iw_free_qp_resources(iwdev, iwqp, qp_num);
- kfree(mem);
return ERR_PTR(err_code);
}
OpenPOWER on IntegriCloud