Skip to content

Commit

Permalink
Bluetooth: Fix memory leak when removing a UUID
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johan Hedberg authored and Gustavo Padovan committed Nov 9, 2012
1 parent acd9454 commit 482049f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/bluetooth/mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
}

Expand Down

0 comments on commit 482049f

Please sign in to comment.