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>
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 @@
continue;
list_del(&match->list);
+ kfree(match);
found++;
}