aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2012-11-08 04:25:26 -0500
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>2012-11-09 10:45:37 -0500
commit482049f75750d73358e65236b933417b69f9cc25 (patch)
tree2a22e246616a8619a4153b2923ddccfe6a184250 /net/bluetooth
parentacd9454433e28c1a365d8b069813c35c1c3a8ac3 (diff)
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>
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/mgmt.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 2cfabe27d3e0..91de4239da66 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,
1367 continue; 1367 continue;
1368 1368
1369 list_del(&match->list); 1369 list_del(&match->list);
1370 kfree(match);
1370 found++; 1371 found++;
1371 } 1372 }
1372 1373