summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorHoang-Nam Nguyen <hnguyen@de.ibm.com>2007-07-12 17:48:22 +0200
committerRoland Dreier <rolandd@cisco.com>2007-07-17 18:37:39 -0700
commit3df78f81e070c0e3330ae1bd40385e2f0d6fea2c (patch)
tree61f7393241728bfd789c6b4785e8553cde93db32 /drivers/infiniband
parentfbb9318be4b6eba36482e1275729c5c3dfdf8156 (diff)
downloadtalos-op-linux-3df78f81e070c0e3330ae1bd40385e2f0d6fea2c.tar.gz
talos-op-linux-3df78f81e070c0e3330ae1bd40385e2f0d6fea2c.zip
IB/ehca: Fix memory leak in error path of ehca_get_dma_mr()
Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/hw/ehca/ehca_mrmw.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/ehca/ehca_mrmw.c b/drivers/infiniband/hw/ehca/ehca_mrmw.c
index add79bd44e39..98f253147d2c 100644
--- a/drivers/infiniband/hw/ehca/ehca_mrmw.c
+++ b/drivers/infiniband/hw/ehca/ehca_mrmw.c
@@ -111,6 +111,7 @@ struct ib_mr *ehca_get_dma_mr(struct ib_pd *pd, int mr_access_flags)
&e_maxmr->ib.ib_mr.lkey,
&e_maxmr->ib.ib_mr.rkey);
if (ret) {
+ ehca_mr_delete(e_maxmr);
ib_mr = ERR_PTR(ret);
goto get_dma_mr_exit0;
}
OpenPOWER on IntegriCloud