提交 1d068842 编写于 作者: S Soenke Huster 提交者: Marcel Holtmann

Bluetooth: virtio_bt: fix memory leak in virtbt_rx_handle()

On the reception of packets with an invalid packet type, the memory of
the allocated socket buffers is never freed. Add a default case that frees
these to avoid a memory leak.

Fixes: afd2daa2 ("Bluetooth: Add support for virtio transport driver")
Signed-off-by: NSoenke Huster <soenke.huster@eknoes.de>
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
上级 b8f5482c
......@@ -202,6 +202,9 @@ static void virtbt_rx_handle(struct virtio_bluetooth *vbt, struct sk_buff *skb)
hci_skb_pkt_type(skb) = pkt_type;
hci_recv_frame(vbt->hdev, skb);
break;
default:
kfree_skb(skb);
break;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册