Skip to contentSkip to conversation

drivers/bluetooth/btsdio.c: fix double-free

PATCH New [email protected] 1 participant 1 message Nov 21, 2007

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 4/5 drivers/bluetooth/btsdio.c: fix double-free

From: Adrian Bunk <[email protected]>

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

---

 drivers/bluetooth/btsdio.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/bluetooth/btsdio.c renamed from drivers/bluetooth/btsdio.c~drivers-bluetooth-btsdioc-fix-double-free +1 -3
diff -puN drivers/bluetooth/btsdio.c~drivers-bluetooth-btsdioc-fix-double-free 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);
 

_