[openib-general] [PATCH 11/14] IB/mthca: Fix memory leak on error path

Roland Dreier roland at topspin.com
Thu Jun 23 21:04:20 PDT 2005


Free page_list buffer on error path of mthca_reg_phys_mr().

Signed-off-by: Roland Dreier <roland at topspin.com>

---

 linux.git/drivers/infiniband/hw/mthca/mthca_provider.c |    1 +
 1 files changed, 1 insertion(+)



--- linux.git.orig/drivers/infiniband/hw/mthca/mthca_provider.c	2005-06-23 13:03:06.413728929 -0700
+++ linux.git/drivers/infiniband/hw/mthca/mthca_provider.c	2005-06-23 13:03:07.987388350 -0700
@@ -559,6 +559,7 @@ static struct ib_mr *mthca_reg_phys_mr(s
 				  convert_access(acc), mr);
 
 	if (err) {
+		kfree(page_list);
 		kfree(mr);
 		return ERR_PTR(err);
 	}




More information about the general mailing list