Commit 3def7be1 authored by Alexander Sack's avatar Alexander Sack Committed by David Zeuthen

Bug 24566 – Properly _ref authority in singleton constructor

http://bugs.freedesktop.org/show_bug.cgi?id=24566Signed-off-by: default avatarDavid Zeuthen <davidz@redhat.com>
parent d7a5e544
......@@ -253,8 +253,10 @@ polkit_authority_class_init (PolkitAuthorityClass *klass)
PolkitAuthority *
polkit_authority_get (void)
{
if (the_authority != NULL)
if (the_authority != NULL) {
g_object_ref (the_authority);
goto out;
}
the_authority = POLKIT_AUTHORITY (g_object_new (POLKIT_TYPE_AUTHORITY, NULL));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment