From: Johan Hedberg Date: Thu, 8 Nov 2012 09:25:26 +0000 (+0100) Subject: Bluetooth: Fix memory leak when removing a UUID X-Git-Tag: v3.7-rc8~6^2~2^2~10^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=482049f75750d73358e65236b933417b69f9cc25;p=platform%2Fkernel%2Flinux-exynos.git Bluetooth: Fix memory leak when removing a UUID 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 Acked-by: Marcel Holtmann Signed-off-by: Gustavo Padovan --- diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 2cfabe2..91de423 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -1367,6 +1367,7 @@ static int remove_uuid(struct sock *sk, struct hci_dev *hdev, void *data, continue; list_del(&match->list); + kfree(match); found++; }