[PATCH] b43: fix memory leak

Sudip Mukherjee <[email protected]>
Newsgroups org.infradead.lists.b43-dev,org.kernel.vger.linux-kernel,org.kernel.vger.linux-wireless,org.kernel.vger.netdev
Message-ID <[email protected]>
On Friday 19 February 2016 01:14 PM, Kalle Valo wrote:
> Michael B?sch <[email protected]> writes:
>
>> On Thu, 18 Feb 2016 18:04:36 +0530
>> Sudip Mukherjee <[email protected]> wrote:
>>
>>> From: Sudip Mukherjee <[email protected]>
>>>
>>> On error we jumped to the label bcma_out and returned the error code but
>>> we missed freeing dev.
>>>
>>> Signed-off-by: Sudip Mukherjee <[email protected]>
>>> ---
>>>   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/

I have an old laptop running on 800Mhz CPU. It has "Broadcom BCM4311 
[14e4:4311] (rev 01)".
I will try to test it on this weekend.

regards
sudip
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.