Bluetooth: Fix memory leak when removing a UUID
Subsystems (2)
PATCH 1/1 Bluetooth: Fix memory leak when removing a UUID
From: Johan Hedberg <[email protected]>
When removing a UUID from the list in the remove_uuid() function we must also kfree the entry in addition to removing it from the list.
Signed-off-by Johan Hedberg <[email protected]>
--- net/bluetooth/mgmt.c | 1 + 1 file changed, 1 insertion(+)
net/bluetooth/mgmt.c +1 -0
@@ -1379,6 +1379,7 @@ static int remove_uuid(struct sock *sk, struct hci_dev *hdev, void *data,continue ;list_del (&match->list); +kfree (match); found++; }
Signature · 1 line
1.7.10.4
Hi Johan,
Quoted 7 lines
When removing a UUID from the list in the
remove_uuid()function we must also kfree the entry in addition to removing it from the list.Signed-off-by Johan Hedberg <[email protected]>--- net/bluetooth/mgmt.c | 1 + 1 file changed, 1 insertion(+)
Acked-by Marcel Holtmann <[email protected]>
Regards
Marcel
Hi Johan,
Quoted 9 lines · Johan Hedberg
From: Johan Hedberg <[email protected]>
When removing a UUID from the list in the
remove_uuid()function we must also kfree the entry in addition to removing it from the list.Signed-off-by Johan Hedberg <[email protected]>--- net/bluetooth/mgmt.c | 1 + 1 file changed, 1 insertion(+)
Patch has been applied to bluetooth.git. Thanks.
Gustavo