[Pkg-telepathy-commits] [telepathy-mission-control-6] 254/280: McdAccountManager: ref the objects in McdLoadAccountsData

Simon McVittie smcv at debian.org
Thu Mar 27 20:07:30 UTC 2014


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch debian
in repository telepathy-mission-control-6.

commit a48f28886f8417dcd10da01cb4e1330e59390119
Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date:   Wed Feb 5 12:39:41 2014 +0000

    McdAccountManager: ref the objects in McdLoadAccountsData
    
    Bug: https://bugs.freedesktop.org/show_bug.cgi?id=74581
    Reviewed-by: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
---
 src/mcd-account-manager.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/mcd-account-manager.c b/src/mcd-account-manager.c
index 5703925..593e698 100644
--- a/src/mcd-account-manager.c
+++ b/src/mcd-account-manager.c
@@ -292,10 +292,10 @@ created_cb (GObject *storage_plugin_obj,
         g_assert (MCD_IS_ACCOUNT (account));
 
         lad = g_slice_new (McdLoadAccountsData);
-        lad->account_manager = am;
-        lad->storage_plugin = plugin;
+        lad->account_manager = g_object_ref (am);
+        lad->storage_plugin = g_object_ref (plugin);
         lad->account_lock = 1; /* released at the end of this function */
-        lad->account = account;
+        lad->account = g_object_ref (account);
     }
     else
     {
@@ -1132,6 +1132,10 @@ release_load_accounts_lock (McdLoadAccountsData *lad)
 
     if (lad->account_lock == 0)
     {
+        g_object_unref (lad->account_manager);
+        g_object_unref (lad->storage_plugin);
+        g_object_unref (lad->account);
+
         g_slice_free (McdLoadAccountsData, lad);
     }
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-telepathy/telepathy-mission-control-6.git



More information about the Pkg-telepathy-commits mailing list