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
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(