summaryrefslogtreecommitdiff
path: root/src/profile.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-08-29 23:26:15 -0700
committerMarcel Holtmann <marcel@holtmann.org>2009-08-29 23:26:15 -0700
commit207d25b3ab7f640855f2c8c1e21380e0995118f5 (patch)
tree085c25b864d44da94cfdcae83c3d080839acb62c /src/profile.c
parent97d8d85cfccf8d65ce3cf229ee265547d53ce149 (diff)
downloadconnman-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.c12
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);
}