From 4401737a3063628b9c2b6ec528ba8dc7007e2b00 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Fri, 2 Mar 2012 02:13:42 +0200 Subject: [PATCH] mgmtops: Fix clearing of pending_uuids after g_slist_free_full() --- plugins/mgmtops.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/mgmtops.c b/plugins/mgmtops.c index 42a8a1f9a..c91e93043 100644 --- a/plugins/mgmtops.c +++ b/plugins/mgmtops.c @@ -179,6 +179,7 @@ static void remove_controller(uint16_t index) btd_manager_unregister_adapter(index); g_slist_free_full(controllers[index].pending_uuids, g_free); + controllers[index].pending_uuids = NULL; memset(&controllers[index], 0, sizeof(struct controller_info)); @@ -338,6 +339,7 @@ static int mgmt_update_powered(struct btd_adapter *adapter, if (!mgmt_powered(settings)) { btd_adapter_stop(adapter); g_slist_free_full(info->pending_uuids, g_free); + info->pending_uuids = NULL; info->pending_uuid = FALSE; info->pending_class = FALSE; return 0; -- 2.47.3