]> err.no Git - linux-2.6/commitdiff
IB/ehca: Fix memory leak in error path of ehca_get_dma_mr()
authorHoang-Nam Nguyen <hnguyen@de.ibm.com>
Thu, 12 Jul 2007 15:48:22 +0000 (17:48 +0200)
committerRoland Dreier <rolandd@cisco.com>
Wed, 18 Jul 2007 01:37:39 +0000 (18:37 -0700)
Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/ehca/ehca_mrmw.c

index add79bd44e398b0ef82fa7f193f27470ccf92714..98f253147d2cd0129118fdfd065c6af345bcebd8 100644 (file)
@@ -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;
                }