From: Michael S. Tsirkin Date: Tue, 20 Sep 2005 17:54:48 +0000 (-0700) Subject: [PATCH] IB/mthca: Fix device removal memory leak X-Git-Tag: v2.6.14-rc3~150^2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=71eea47d853bb0ce0c6befe11b3e08111263170f;p=linux-2.6 [PATCH] IB/mthca: Fix device removal memory leak Clean up QP table array on device removal. Signed-off-by: Michael S. Tsirkin Signed-off-by: Roland Dreier --- diff --git a/drivers/infiniband/hw/mthca/mthca_qp.c b/drivers/infiniband/hw/mthca/mthca_qp.c index eaa5218576..5fa00669f9 100644 --- a/drivers/infiniband/hw/mthca/mthca_qp.c +++ b/drivers/infiniband/hw/mthca/mthca_qp.c @@ -2123,5 +2123,6 @@ void __devexit mthca_cleanup_qp_table(struct mthca_dev *dev) for (i = 0; i < 2; ++i) mthca_CONF_SPECIAL_QP(dev, i, 0, &status); + mthca_array_cleanup(&dev->qp_table.qp, dev->limits.num_qps); mthca_alloc_cleanup(&dev->qp_table.alloc); }