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 <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
This commit is contained in:
Johan Hedberg 2012-11-08 10:25:26 +01:00 коммит произвёл Gustavo Padovan
Родитель acd9454433
Коммит 482049f757
1 изменённых файлов: 1 добавлений и 0 удалений

Просмотреть файл

@ -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++;
}