[openib-general] [PATCH] mthca: fix memory leak

Jack Morgenstein jackm at mellanox.co.il
Thu Dec 8 08:16:25 PST 2005


Hi,
This patch frees the memory allocated in mthca_init_user_db_tab.

Signed-off-by: Jack Morgenstein <jackm at mellanox.co.il>

Index: linux-kernel/drivers/infiniband/hw/mthca/mthca_memfree.c
===================================================================
--- linux-kernel.orig/drivers/infiniband/hw/mthca/mthca_memfree.c
+++ linux-kernel/drivers/infiniband/hw/mthca/mthca_memfree.c
@@ -485,6 +485,7 @@ void mthca_cleanup_user_db_tab(struct mt
 			put_page(db_tab->page[i].mem.page);
 		}
 	}
+	kfree(db_tab);
 }
 
 int mthca_alloc_db(struct mthca_dev *dev, enum mthca_db_type type,



More information about the general mailing list