From: Roland Dreier Date: Mon, 27 Jun 2005 21:36:44 +0000 (-0700) Subject: [PATCH] IB/mthca: Fix memory leak on error path X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=761f9eb8c31f72692aad118e51e2a59a80467088;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [PATCH] IB/mthca: Fix memory leak on error path Free page_list buffer on error path of mthca_reg_phys_mr(). Signed-off-by: Roland Dreier Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/infiniband/hw/mthca/mthca_provider.c b/drivers/infiniband/hw/mthca/mthca_provider.c index f8e68b9db84e..0b5adfd91597 100644 --- a/drivers/infiniband/hw/mthca/mthca_provider.c +++ b/drivers/infiniband/hw/mthca/mthca_provider.c @@ -559,6 +559,7 @@ static struct ib_mr *mthca_reg_phys_mr(struct ib_pd *pd, convert_access(acc), mr); if (err) { + kfree(page_list); kfree(mr); return ERR_PTR(err); }