public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [2.6 patch] drivers/bluetooth/btsdio.c: fix double-free
@ 2007-10-24 16:26 Adrian Bunk
  2007-10-24 16:39 ` Marcel Holtmann
  0 siblings, 1 reply; 2+ messages in thread
From: Adrian Bunk @ 2007-10-24 16:26 UTC (permalink / raw)
  To: David Vrabel, Marcel Holtmann, maxk; +Cc: bluez-devel, linux-kernel

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);
 

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [2.6 patch] drivers/bluetooth/btsdio.c: fix double-free
  2007-10-24 16:26 [2.6 patch] drivers/bluetooth/btsdio.c: fix double-free Adrian Bunk
@ 2007-10-24 16:39 ` Marcel Holtmann
  0 siblings, 0 replies; 2+ messages in thread
From: Marcel Holtmann @ 2007-10-24 16:39 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: David Vrabel, maxk, bluez-devel, linux-kernel

Hi Adrian,

> This patch fixes a double-free spotted by the Coverity checker.

good catch. Patch has been applied to me tree. Thanks.

Regards

Marcel



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-10-24 16:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-24 16:26 [2.6 patch] drivers/bluetooth/btsdio.c: fix double-free Adrian Bunk
2007-10-24 16:39 ` Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox