[gnome-online-accounts] daemon: Consolidate exit paths & make the ref / unref more obvious
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-online-accounts] daemon: Consolidate exit paths & make the ref / unref more obvious
- Date: Thu, 1 Sep 2016 14:52:50 +0000 (UTC)
commit 7cab741ae85b5131ec5bfc4e46156155154c4ae3
Author: Debarshi Ray <debarshir gnome org>
Date: Fri Aug 26 15:37:00 2016 +0200
daemon: Consolidate exit paths & make the ref / unref more obvious
https://bugzilla.gnome.org/show_bug.cgi?id=770610
src/daemon/goadaemon.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/daemon/goadaemon.c b/src/daemon/goadaemon.c
index ef81d85..62dcc84 100644
--- a/src/daemon/goadaemon.c
+++ b/src/daemon/goadaemon.c
@@ -476,8 +476,7 @@ add_config_file (GoaDaemon *self,
error->message, g_quark_to_string (error->domain), error->code);
}
g_error_free (error);
- g_key_file_unref (key_file);
- return;
+ goto out;
}
guid = g_dbus_connection_get_guid (self->connection);
@@ -576,7 +575,10 @@ add_config_file (GoaDaemon *self,
}
}
- *key_files_to_free = g_list_prepend (*key_files_to_free, key_file);
+ *key_files_to_free = g_list_prepend (*key_files_to_free, g_key_file_ref (key_file));
+
+ out:
+ g_key_file_unref (key_file);
}
/* ---------------------------------------------------------------------------------------------------- */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]