summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw
diff options
context:
space:
mode:
authorRoland Dreier <roland@topspin.com>2005-06-27 23:36:44 +0200
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-28 00:11:46 +0200
commit761f9eb8c31f72692aad118e51e2a59a80467088 (patch)
treea3663084daf11a4e6576661ea9aa9143bfc276b3 /drivers/infiniband/hw
parent[PATCH] IB/mthca: Split off MTT allocation (diff)
downloadlinux-761f9eb8c31f72692aad118e51e2a59a80467088.tar.xz
linux-761f9eb8c31f72692aad118e51e2a59a80467088.zip
[PATCH] IB/mthca: Fix memory leak on error path
Free page_list buffer on error path of mthca_reg_phys_mr(). Signed-off-by: Roland Dreier <roland@topspin.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/infiniband/hw')
-rw-r--r--drivers/infiniband/hw/mthca/mthca_provider.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_provider.c b/drivers/infiniband/hw/mthca/mthca_provider.c
index f8e68b9db84e..0b5adfd91597 100644
--- a/drivers/infiniband/hw/mthca/mthca_provider.c
+++ b/drivers/infiniband/hw/mthca/mthca_provider.c
@@ -559,6 +559,7 @@ static struct ib_mr *mthca_reg_phys_mr(struct ib_pd *pd,
convert_access(acc), mr);
if (err) {
+ kfree(page_list);
kfree(mr);
return ERR_PTR(err);
}