From: Daniel Wagner <[email protected]>

By calling __connman_session_cleanup() before __connman_plugin_cleanup()
we make sure all resources allocated can released in the correct order.
The code assumes after an successful allocation, free will always work
and therefore we double free allocated memory.
---
 src/main.c | 2 +-
 1 file changed, 1 insertion(+), 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();
-- 
1.8.2.rc3.16.gce432ca

_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to