From: akpm@linux-foundation.org
To: marcel@holtmann.org
Cc: netdev@vger.kernel.org, akpm@linux-foundation.org, bunk@kernel.org
Subject: [patch 4/7] drivers/bluetooth/btsdio.c: fix double-free
Date: Mon, 04 Feb 2008 23:48:16 -0800 [thread overview]
Message-ID: <200802050747.m157lvnE010455@imap1.linux-foundation.org> (raw)
From: Adrian Bunk <bunk@kernel.org>
This patch fixes a double-free spotted by the Coverity checker.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/bluetooth/btsdio.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff -puN drivers/bluetooth/btsdio.c~drivers-bluetooth-btsdioc-fix-double-free drivers/bluetooth/btsdio.c
--- a/drivers/bluetooth/btsdio.c~drivers-bluetooth-btsdioc-fix-double-free
+++ a/drivers/bluetooth/btsdio.c
@@ -162,10 +162,8 @@ static int btsdio_rx_packet(struct btsdi
bt_cb(skb)->pkt_type = hdr[3];
err = hci_recv_frame(skb);
- if (err < 0) {
- kfree(skb);
+ if (err < 0)
return err;
- }
sdio_writeb(data->func, 0x00, REG_PC_RRT, NULL);
_
next reply other threads:[~2008-02-05 7:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-05 7:48 akpm [this message]
2008-02-05 11:09 ` [patch 4/7] drivers/bluetooth/btsdio.c: fix double-free David Miller
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=200802050747.m157lvnE010455@imap1.linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=bunk@kernel.org \
--cc=marcel@holtmann.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