[gnome-online-accounts/gnome-3-20] daemon: Don't leak the provider	when coalescing EnsureCredential calls
- From: Debarshi Ray <debarshir src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [gnome-online-accounts/gnome-3-20] daemon: Don't leak the provider	when coalescing EnsureCredential calls
 
- Date: Fri,  6 Jan 2017 12:15:20 +0000 (UTC)
 
commit f5325f00c0d2cae9e5f6253c59c713c4b223af1f
Author: Debarshi Ray <debarshir gnome org>
Date:   Thu Jan 5 18:18:22 2017 +0100
    daemon: Don't leak the provider when coalescing EnsureCredential calls
    
    https://bugzilla.gnome.org/show_bug.cgi?id=765121
 src/daemon/goadaemon.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/daemon/goadaemon.c b/src/daemon/goadaemon.c
index 0d929f3..b951e49 100644
--- a/src/daemon/goadaemon.c
+++ b/src/daemon/goadaemon.c
@@ -1496,12 +1496,12 @@ goa_daemon_check_credentials (GoaDaemon *self)
 
       account = goa_object_peek_account (object);
       if (account == NULL)
-        continue;
+        goto cleanup_and_continue;
 
       provider_type = goa_account_get_provider_type (account);
       provider = goa_provider_get_for_provider_type (provider_type);
       if (provider == NULL)
-        continue;
+        goto cleanup_and_continue;
 
       id = goa_account_get_id (account);
       provider_type = goa_account_get_provider_type (account);
@@ -1518,7 +1518,7 @@ goa_daemon_check_credentials (GoaDaemon *self)
                    timestamp,
                    provider_type,
                    id);
-          continue;
+          goto cleanup_and_continue;
         }
 
       data = object_invocation_data_new (object, NULL);
@@ -1528,6 +1528,7 @@ goa_daemon_check_credentials (GoaDaemon *self)
       g_task_set_task_data (task, data, (GDestroyNotify) object_invocation_data_unref);
       g_queue_push_tail (self->ensure_credentials_queue, g_object_ref (task));
 
+    cleanup_and_continue:
       g_clear_object (&provider);
       g_clear_object (&task);
     }
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]