IB/mthca: fix memory user DB table leak
authorJack Morgenstein <jackm@mellanox.co.il>
Fri, 9 Dec 2005 21:48:50 +0000 (13:48 -0800)
committerRoland Dreier <rolandd@cisco.com>
Fri, 9 Dec 2005 21:48:50 +0000 (13:48 -0800)
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@mellanox.co.il>
Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/mthca/mthca_memfree.c

index d72fe95cba08852c10b9321c261fd8d64d286e27..5798ed00d83d1f0356e1a8c96c5d5b137ce9936f 100644 (file)
@@ -485,6 +485,8 @@ void mthca_cleanup_user_db_tab(struct mthca_dev *dev, struct mthca_uar *uar,
                        put_page(db_tab->page[i].mem.page);
                }
        }
+
+       kfree(db_tab);
 }
 
 int mthca_alloc_db(struct mthca_dev *dev, enum mthca_db_type type,