summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Wagner <daniel.wagner@bmw-carit.de>2013-04-09 18:13:07 +0200
committerPatrik Flykt <patrik.flykt@linux.intel.com>2013-04-18 08:43:43 +0300
commitd0afc98e7bbe46d48d0f0212d8062a52e004f986 (patch)
tree1b68488d96e3c6587df792bd3a59f5cffafe311a
parentd1e576cfbe3d7458e984264ba2efc3f17088a0ce (diff)
downloadconnman-d0afc98e7bbe46d48d0f0212d8062a52e004f986.tar.gz
connman-d0afc98e7bbe46d48d0f0212d8062a52e004f986.tar.bz2
connman-d0afc98e7bbe46d48d0f0212d8062a52e004f986.zip
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.
-rw-r--r--src/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 0f479432..a76ec3ba 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();