]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
drivers/bluetooth/btsdio.c: fix double-free
authorAdrian Bunk <bunk@kernel.org>
Tue, 5 Feb 2008 11:09:17 +0000 (03:09 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 5 Feb 2008 11:09:17 +0000 (03:09 -0800)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/bluetooth/btsdio.c

index b786f618790210857f429bea9d21eb83266c1499..58630cc1eff2f1047ed0049edcbb9c4e578d511f 100644 (file)
@@ -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);