[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1455798876-32186-1-git-send-email-sudipm.mukherjee@gmail.com>
Date: Thu, 18 Feb 2016 18:04:36 +0530
From: Sudip Mukherjee <sudipm.mukherjee@...il.com>
To: Kalle Valo <kvalo@...eaurora.org>
Cc: linux-kernel@...r.kernel.org, linux-wireless@...r.kernel.org,
b43-dev@...ts.infradead.org, netdev@...r.kernel.org
Subject: [PATCH] b43: fix memory leak
From: Sudip Mukherjee <sudip@...torindia.org>
On error we jumped to the label bcma_out and returned the error code but
we missed freeing dev.
Signed-off-by: Sudip Mukherjee <sudip@...torindia.org>
---
drivers/net/wireless/broadcom/b43/main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/wireless/broadcom/b43/main.c b/drivers/net/wireless/broadcom/b43/main.c
index c279211..78f670a 100644
--- a/drivers/net/wireless/broadcom/b43/main.c
+++ b/drivers/net/wireless/broadcom/b43/main.c
@@ -5671,6 +5671,7 @@ static int b43_bcma_probe(struct bcma_device *core)
wl = b43_wireless_init(dev);
if (IS_ERR(wl)) {
err = PTR_ERR(wl);
+ kfree(dev);
goto bcma_out;
}
--
1.9.1
Powered by blists - more mailing lists