From ffd41ce58db5303a93c0493e3765ae366a4f1d25 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 (cherry picked from commit 6a073b02dbfda060142f7d47426fec55c7caba0d) --- src/mcd-account-manager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/mcd-account-manager.c b/src/mcd-account-manager.c index a2219106..59693cbc 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