[openib-general] [git patch review 5/5] IB/mthca: fix memory user DB table leak

Roland Dreier rolandd at cisco.com
Fri Dec 9 13:51:50 PST 2005


Free the memory allocated in mthca_init_user_db_tab() when releasing
the db_tab in mthca_cleanup_user_db_tab().

Signed-off-by: Jack Morgenstein <jackm at mellanox.co.il>
Signed-off-by: Michael S. Tsirkin <mst at mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd at cisco.com>

---

 drivers/infiniband/hw/mthca/mthca_memfree.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

52d0df153c987e4ad57d15f5df91848f65858e5d
diff --git a/drivers/infiniband/hw/mthca/mthca_memfree.c b/drivers/infiniband/hw/mthca/mthca_memfree.c
index d72fe95..5798ed0 100644
--- a/drivers/infiniband/hw/mthca/mthca_memfree.c
+++ b/drivers/infiniband/hw/mthca/mthca_memfree.c
@@ -485,6 +485,8 @@ 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,
-- 
0.99.9l



More information about the general mailing list