Skip to contentSkip to conversation

Bluetooth: Fix memory leak when removing a UUID

PATCH In review Johan Hedberg 3 participants 3 messages Nov 8, 2012 – Nov 9, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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.

---
 net/bluetooth/mgmt.c |    1 +
 1 file changed, 1 insertion(+)
net/bluetooth/mgmt.c +1 -0
index ad1054f..142764a 100644
@@ -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