diff options
author | Adrian Bunk <bunk@kernel.org> | 2008-02-05 12:09:17 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-02-05 12:09:17 +0100 |
commit | 2fa993423a345fd484f7295797ddb59b7738ad38 (patch) | |
tree | 309db06f9709919a78e55683a3bf22dca944fe56 /drivers/bluetooth | |
parent | drivers/bluetooth/bpa10x.c: fix memleak (diff) | |
download | linux-2fa993423a345fd484f7295797ddb59b7738ad38.tar.xz linux-2fa993423a345fd484f7295797ddb59b7738ad38.zip |
drivers/bluetooth/btsdio.c: fix double-free
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>
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r-- | drivers/bluetooth/btsdio.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/bluetooth/btsdio.c b/drivers/bluetooth/btsdio.c index b786f6187902..58630cc1eff2 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); |