From 9052edc5910d55ad2f693cfb9b405003a7d4032a Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Wed, 5 Jun 2013 07:31:22 +0300 Subject: [PATCH] core: Fix memory leak in device_remove_profiles Calling just g_slist_free will not free the actual elements (which are each allocated with g_strdup). --- src/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/device.c b/src/device.c index c05aa6c6f..e30af0a16 100644 --- a/src/device.c +++ b/src/device.c @@ -2574,7 +2574,7 @@ static void device_remove_profiles(struct btd_device *device, GSList *uuids) DBG("Removing profiles for %s", dstaddr); - g_slist_free(device->uuids); + g_slist_free_full(device->uuids, g_free); device->uuids = NULL; store_device_info(device); -- 2.47.3