From: Wu Jiangbo Date: Tue, 5 Nov 2013 06:24:58 +0000 (+0800) Subject: Bug fixing: net-config crash after system reboot X-Git-Tag: submit/tizen/20140331.011738~3^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ec1a3b0021436e4848b983f11a47106b230acd23;p=platform%2Fcore%2Fconnectivity%2Fnet-config.git Bug fixing: net-config crash after system reboot Root cause: When device powers off, g_slist_free_full() uses a NULL pointer as destroy function, which leads to net-config crash. Solution: Use function g_slist_free() to replace g_slist_free_full() to free the list when net-config exits. Change-Id: Ia9d5d6920b537fe8337a319fbd048167d244284e --- diff --git a/src/wifi-state.c b/src/wifi-state.c index c445f3d..f4bc103 100644 --- a/src/wifi-state.c +++ b/src/wifi-state.c @@ -440,7 +440,13 @@ void netconfig_wifi_check_network_notification(DBusMessage *message) void netconfig_wifi_state_notifier_cleanup(void) { - g_slist_free_full(notifier_list, NULL); + /* + * Now, all the user_data of notifier_list's element + * is NULL, so we don't free that, only use g_slist_free. + * If user_data is not NULL, using g_slist_free_full with + * destory_notify function to free user_data + */ + g_slist_free(notifier_list); } void netconfig_wifi_state_notifier_register(