Skip to content

Commit 2fa9934

Browse files
AdrianBunkdavem330
authored andcommitted
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>
1 parent cb7cd42 commit 2fa9934

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

‎drivers/bluetooth/btsdio.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,8 @@ static int btsdio_rx_packet(struct btsdio_data *data)
162162
bt_cb(skb)->pkt_type = hdr[3];
163163

164164
err = hci_recv_frame(skb);
165-
if (err < 0) {
166-
kfree(skb);
165+
if (err < 0)
167166
return err;
168-
}
169167

170168
sdio_writeb(data->func, 0x00, REG_PC_RRT, NULL);
171169

0 commit comments

Comments
 (0)