diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2009-08-29 23:26:15 -0700 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2009-08-29 23:26:15 -0700 |
commit | 207d25b3ab7f640855f2c8c1e21380e0995118f5 (patch) | |
tree | 085c25b864d44da94cfdcae83c3d080839acb62c /src/profile.c | |
parent | 97d8d85cfccf8d65ce3cf229ee265547d53ce149 (diff) | |
download | connman-207d25b3ab7f640855f2c8c1e21380e0995118f5.tar.gz connman-207d25b3ab7f640855f2c8c1e21380e0995118f5.tar.bz2 connman-207d25b3ab7f640855f2c8c1e21380e0995118f5.zip |
Fix profile cleanup race condition
Diffstat (limited to 'src/profile.c')
-rw-r--r-- | src/profile.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/profile.c b/src/profile.c index 0b2a4119..71a3067d 100644 --- a/src/profile.c +++ b/src/profile.c @@ -706,15 +706,13 @@ void __connman_profile_cleanup(void) { DBG(""); - if (profiles != NULL) { - g_hash_table_destroy(profiles); - profiles = NULL; - } - - connman_storage_unregister(&profile_storage); - if (connection == NULL) return; + g_hash_table_destroy(profiles); + profiles = NULL; + + connman_storage_unregister(&profile_storage); + dbus_connection_unref(connection); } |