From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kalle Valo Date: Fri, 19 Feb 2016 09:44:48 +0200 Subject: [PATCH] b43: fix memory leak In-Reply-To: <20160218173212.03670d97@wiggum> ("Michael =?utf-8?Q?B=C3=BCs?= =?utf-8?Q?ch=22's?= message of "Thu, 18 Feb 2016 17:32:12 +0100") References: <1455798876-32186-1-git-send-email-sudipm.mukherjee@gmail.com> <20160218173212.03670d97@wiggum> Message-ID: <87io1lqh3j.fsf@purkki.adurom.net> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Michael =?utf-8?Q?B=C3=BCsch?= Cc: Sudip Mukherjee , netdev@vger.kernel.org, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, b43-dev@lists.infradead.org, Jia-Ju Bai Michael B?sch writes: > On Thu, 18 Feb 2016 18:04:36 +0530 > Sudip Mukherjee wrote: > >> From: Sudip Mukherjee >> >> On error we jumped to the label bcma_out and returned the error code but >> we missed freeing dev. >> >> Signed-off-by: Sudip Mukherjee >> --- >> 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; >> } >> > > We recently had a patch that fixes this, among more leaks. Subject: > [PATCH v2 resend] b43: Fix memory leaks in b43_bus_dev_ssb_init and > b43_bus_dev_bcma_init > > Please test that patch instead, so we can finally apply it. > > It needs to be tested on both ssb and bcma. Come on. This isn't too > hard. :) Please somebody with any hardware test it. (I currently don't > have any b43 hardware) And the patch can be downloaded from patchwork: https://patchwork.kernel.org/patch/8049041/ -- Kalle Valo