telepathy-mission-control: Zero-initialize McdLoadAccountsData

Simon McVittie smcv at kemper.freedesktop.org
Thu Mar 20 10:52:13 PDT 2014


Module: telepathy-mission-control
Branch: master
Commit: ffd41ce58db5303a93c0493e3765ae366a4f1d25
URL:    http://cgit.freedesktop.org/telepathy/telepathy-mission-control/commit/?id=ffd41ce58db5303a93c0493e3765ae366a4f1d25

Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date:   Wed Mar 19 19:54:42 2014 +0000

Zero-initialize McdLoadAccountsData

Otherwise, holds_setup_lock is sometimes initially nonzero, making
us think we have the setup lock when really we don't, and leading
to an assertion failure when we try to release it.

For some reason I could only reproduce this during distcheck...

Reviewed-by: Xavier Claessens
(cherry picked from commit 6a073b02dbfda060142f7d47426fec55c7caba0d)

---

 src/mcd-account-manager.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mcd-account-manager.c b/src/mcd-account-manager.c
index a221910..59693cb 100644
--- a/src/mcd-account-manager.c
+++ b/src/mcd-account-manager.c
@@ -278,7 +278,7 @@ created_cb (McdStorage *storage,
     account = mcd_account_new (am, name, priv->minotaur, plugin);
     g_assert (MCD_IS_ACCOUNT (account));
 
-    lad = g_slice_new (McdLoadAccountsData);
+    lad = g_slice_new0 (McdLoadAccountsData);
     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 */



More information about the telepathy-commits mailing list