* [PATCH] Bluetooth: Fix memory leak when removing a UUID
@ 2012-11-08 9:25 Johan Hedberg
2012-11-08 13:43 ` Marcel Holtmann
2012-11-09 9:46 ` Gustavo Padovan
0 siblings, 2 replies; 3+ messages in thread
From: Johan Hedberg @ 2012-11-08 9:25 UTC (permalink / raw)
To: linux-bluetooth
From: Johan Hedberg <johan.hedberg@intel.com>
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>
---
net/bluetooth/mgmt.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index ad1054f..142764a 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -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++;
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Bluetooth: Fix memory leak when removing a UUID
2012-11-08 9:25 [PATCH] Bluetooth: Fix memory leak when removing a UUID Johan Hedberg
@ 2012-11-08 13:43 ` Marcel Holtmann
2012-11-09 9:46 ` Gustavo Padovan
1 sibling, 0 replies; 3+ messages in thread
From: Marcel Holtmann @ 2012-11-08 13:43 UTC (permalink / raw)
To: Johan Hedberg; +Cc: linux-bluetooth
Hi Johan,
> 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>
> ---
> net/bluetooth/mgmt.c | 1 +
> 1 file changed, 1 insertion(+)
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Regards
Marcel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Bluetooth: Fix memory leak when removing a UUID
2012-11-08 9:25 [PATCH] Bluetooth: Fix memory leak when removing a UUID Johan Hedberg
2012-11-08 13:43 ` Marcel Holtmann
@ 2012-11-09 9:46 ` Gustavo Padovan
1 sibling, 0 replies; 3+ messages in thread
From: Gustavo Padovan @ 2012-11-09 9:46 UTC (permalink / raw)
To: Johan Hedberg; +Cc: linux-bluetooth
Hi Johan,
* Johan Hedberg <johan.hedberg@gmail.com> [2012-11-08 10:25:26 +0100]:
> From: Johan Hedberg <johan.hedberg@intel.com>
>
> 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>
> ---
> net/bluetooth/mgmt.c | 1 +
> 1 file changed, 1 insertion(+)
Patch has been applied to bluetooth.git. Thanks.
Gustavo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-11-09 9:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-08 9:25 [PATCH] Bluetooth: Fix memory leak when removing a UUID Johan Hedberg
2012-11-08 13:43 ` Marcel Holtmann
2012-11-09 9:46 ` Gustavo Padovan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).