From 6a073b02dbfda060142f7d47426fec55c7caba0d Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 19 Mar 2014 19:54:42 +0000 Subject: 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 8b82e254..d11659aa 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 */ -- cgit v1.2.1