提交 2fa99342 编写于 作者: A Adrian Bunk 提交者: David S. Miller

drivers/bluetooth/btsdio.c: fix double-free

This patch fixes a double-free spotted by the Coverity checker.
Signed-off-by: NAdrian Bunk <bunk@kernel.org>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 cb7cd429
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册