Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 482049f7 authored by Johan Hedberg's avatar Johan Hedberg Committed by Gustavo Padovan
Browse files

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: default avatarJohan Hedberg <johan.hedberg@intel.com>
Acked-by: default avatarMarcel Holtmann <marcel@holtmann.org>
Signed-off-by: default avatarGustavo Padovan <gustavo.padovan@collabora.co.uk>
parent acd94544
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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++;
	}