From: Adrian Bunk Date: Tue, 5 Feb 2008 11:09:17 +0000 (-0800) Subject: drivers/bluetooth/btsdio.c: fix double-free X-Git-Tag: v2.6.25-rc1~787^2~8 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=2fa993423a345fd484f7295797ddb59b7738ad38;p=linux-2.6-omap-h63xx.git drivers/bluetooth/btsdio.c: fix double-free This patch fixes a double-free spotted by the Coverity checker. Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: David S. Miller --- diff --git a/drivers/bluetooth/btsdio.c b/drivers/bluetooth/btsdio.c index b786f618790..58630cc1eff 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);