mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-18 20:04:16 +08:00
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>
This commit is contained in:
parent
cb7cd42930
commit
2fa993423a
@ -162,10 +162,8 @@ static int btsdio_rx_packet(struct btsdio_data *data)
|
|||||||
bt_cb(skb)->pkt_type = hdr[3];
|
bt_cb(skb)->pkt_type = hdr[3];
|
||||||
|
|
||||||
err = hci_recv_frame(skb);
|
err = hci_recv_frame(skb);
|
||||||
if (err < 0) {
|
if (err < 0)
|
||||||
kfree(skb);
|
|
||||||
return err;
|
return err;
|
||||||
}
|
|
||||||
|
|
||||||
sdio_writeb(data->func, 0x00, REG_PC_RRT, NULL);
|
sdio_writeb(data->func, 0x00, REG_PC_RRT, NULL);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user