Skip to content
Commit 855af2d7 authored by Anant Thazhemadam's avatar Anant Thazhemadam Committed by Marcel Holtmann
Browse files

Bluetooth: hci_h5: fix memory leak in h5_close



When h5_close() is called, h5 is directly freed when !hu->serdev.
However, h5->rx_skb is not freed, which causes a memory leak.

Freeing h5->rx_skb and setting it to NULL, fixes this memory leak.

Fixes: ce945552 ("Bluetooth: hci_h5: Add support for serdev enumerated devices")
Reported-by: default avatar <syzbot+6ce141c55b2f7aafd1c4@syzkaller.appspotmail.com>
Tested-by: default avatar <syzbot+6ce141c55b2f7aafd1c4@syzkaller.appspotmail.com>
Signed-off-by: default avatarAnant Thazhemadam <anant.thazhemadam@gmail.com>
Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent cca342d9
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment