From: Daniel Wagner <[email protected]>
The core wants to call the destroy function from the plugin. Therefore
we need to move __connman_session_cleanup() before the
__connman_plugin_cleanup(). We also need to take care not to access
the session_hash in remove_policy() function since that table has
already been destroyed.
---
src/main.c | 2 +-
src/session.c | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/main.c b/src/main.c
index 0f47943..a76ec3b 100644
--- a/src/main.c
+++ b/src/main.c
@@ -676,11 +676,11 @@ int main(int argc, char *argv[])
__connman_wpad_cleanup();
__connman_dhcpv6_cleanup();
__connman_dhcp_cleanup();
+ __connman_session_cleanup();
__connman_plugin_cleanup();
__connman_provider_cleanup();
__connman_connection_cleanup();
__connman_timeserver_cleanup();
- __connman_session_cleanup();
__connman_detect_cleanup();
__connman_proxy_cleanup();
__connman_task_cleanup();
diff --git a/src/session.c b/src/session.c
index 39920af..d06edc8 100644
--- a/src/session.c
+++ b/src/session.c
@@ -359,6 +359,9 @@ static void remove_policy(struct connman_session_policy
*policy)
gpointer key, value;
struct connman_session *session;
+ if (session_hash == NULL)
+ return;
+
DBG("policy %p name %s", policy, policy->name);
g_hash_table_iter_init(&iter, session_hash);
--
1.8.2.rc3.16.gce432ca
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman