netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: Kalle Valo <kvalo@codeaurora.org>
Cc: linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org,
	b43-dev@lists.infradead.org, netdev@vger.kernel.org
Subject: [PATCH] b43: fix memory leak
Date: Thu, 18 Feb 2016 18:04:36 +0530	[thread overview]
Message-ID: <1455798876-32186-1-git-send-email-sudipm.mukherjee@gmail.com> (raw)

From: Sudip Mukherjee <sudip@vectorindia.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@vectorindia.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

             reply	other threads:[~2016-02-18 12:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-18 12:34 Sudip Mukherjee [this message]
2016-02-18 13:40 ` [PATCH] b43: fix memory leak Rafał Miłecki
2016-02-18 16:32 ` Michael Büsch
2016-02-19  7:44   ` Kalle Valo
2016-02-19 15:07     ` Sudip Mukherjee
     [not found]       ` <56C72FA6.3090102-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-03-10 17:43         ` Michael Büsch
2016-03-10 17:56           ` Sudip Mukherjee

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1455798876-32186-1-git-send-email-sudipm.mukherjee@gmail.com \
    --to=sudipm.mukherjee@gmail.com \
    --cc=b43-dev@lists.infradead.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).