[next] telepathy-mission-control: Zero-initialize McdLoadAccountsData

Simon McVittie smcv at kemper.freedesktop.org
Wed Mar 19 12:57:33 PDT 2014


Module: telepathy-mission-control
Branch: next
Commit: 6a073b02dbfda060142f7d47426fec55c7caba0d
URL:    http://cgit.freedesktop.org/telepathy/telepathy-mission-control/commit/?id=6a073b02dbfda060142f7d47426fec55c7caba0d

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

---

 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 8b82e25..d11659a 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