From: Adrian Bunk <bunk@kernel.org>
To: David Vrabel <david.vrabel@csr.com>,
Marcel Holtmann <marcel@holtmann.org>,
maxk@qualcomm.com
Cc: bluez-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: [2.6 patch] drivers/bluetooth/btsdio.c: fix double-free
Date: Wed, 24 Oct 2007 18:26:35 +0200 [thread overview]
Message-ID: <20071024162635.GM30533@stusta.de> (raw)
This patch fixes a double-free spotted by the Coverity checker.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
---
09bae986c340a634714517659822959cef72f66d
diff --git a/drivers/bluetooth/btsdio.c b/drivers/bluetooth/btsdio.c
index b786f61..58630cc 100644
--- a/drivers/bluetooth/btsdio.c
+++ b/drivers/bluetooth/btsdio.c
@@ -162,10 +162,8 @@ static int btsdio_rx_packet(struct btsdio_data *data)
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:[~2007-10-24 16:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-24 16:26 Adrian Bunk [this message]
2007-10-24 16:39 ` [2.6 patch] drivers/bluetooth/btsdio.c: fix double-free Marcel Holtmann
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=20071024162635.GM30533@stusta.de \
--to=bunk@kernel.org \
--cc=bluez-devel@lists.sourceforge.net \
--cc=david.vrabel@csr.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marcel@holtmann.org \
--cc=maxk@qualcomm.com \
/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