From d0afc98e7bbe46d48d0f0212d8062a52e004f986 Mon Sep 17 00:00:00 2001 From: Daniel Wagner Date: Tue, 9 Apr 2013 18:13:07 +0200 Subject: [PATCH] session: Reorder shutdown sequence 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(); -- 2.7.4