]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] IB/mthca: Fix memory leak on error path
authorRoland Dreier <roland@topspin.com>
Mon, 27 Jun 2005 21:36:44 +0000 (14:36 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Mon, 27 Jun 2005 22:11:46 +0000 (15:11 -0700)
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>
drivers/infiniband/hw/mthca/mthca_provider.c

index f8e68b9db84ee3c9d30c449aac03704d2ad8397d..0b5adfd91597a1ec376bd895d55a3b781b21f22d 100644 (file)
@@ -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);
        }