[telepathy-account-widgets] account-settings: Fix GSimpleAsyncResult leaks



commit 906c887c5ecb1863847b2ce84adaa43d0c985fdc
Author: Christophe Fergeau <cfergeau redhat com>
Date:   Wed Jul 29 22:49:39 2015 +0200

    account-settings: Fix GSimpleAsyncResult leaks
    
    tpaw_account_setting_set_display_name_async() and
    tpaw_account_settings_set_icon_name_async() can return immediatly in an
    idle when they don't have work to do. However in that case, these
    methods don't drop the reference they own on the GSimpleAsyncResult used
    for the async operation. This commit adds the missing g_object_unref()
    calls.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=752938

 tp-account-widgets/tpaw-account-settings.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/tp-account-widgets/tpaw-account-settings.c b/tp-account-widgets/tpaw-account-settings.c
index 82f7054..2445ad8 100644
--- a/tp-account-widgets/tpaw-account-settings.c
+++ b/tp-account-widgets/tpaw-account-settings.c
@@ -1083,6 +1083,7 @@ tpaw_account_settings_set_display_name_async (
     {
       /* Nothing to do */
       g_simple_async_result_complete_in_idle (result);
+      g_object_unref (result);
       return;
     }
 
@@ -1092,6 +1093,7 @@ tpaw_account_settings_set_display_name_async (
   if (settings->priv->account == NULL)
     {
       g_simple_async_result_complete_in_idle (result);
+      g_object_unref (result);
       return;
     }
 
@@ -1159,6 +1161,7 @@ tpaw_account_settings_set_icon_name_async (
       settings->priv->icon_name = g_strdup (name);
 
       g_simple_async_result_complete_in_idle (result);
+      g_object_unref (result);
 
       return;
     }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]