From: Adrian Bunk <[EMAIL PROTECTED]>

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

Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---

 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);
 
_
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to