dir: Always call g_once_init_leave() for languages

Otherwise we leave the g_once_init_enter() call unpaired.

Closes https://github.com/flatpak/flatpak/issues/5588
Fixes 14c548301c
This commit is contained in:
Georges Basile Stavracas Neto
2023-11-14 13:02:51 -03:00
committed by Simon McVittie
parent fac93e69d5
commit 9d63abef0a

View File

@@ -16387,11 +16387,11 @@ get_system_locales (FlatpakDir *self)
* not NULL, it means that AccountsService exists */
if (accounts_proxy != NULL)
get_locale_langs_from_accounts_dbus (accounts_proxy, langs);
g_ptr_array_add (langs, NULL);
g_once_init_leave (&cached, langs);
}
g_ptr_array_add (langs, NULL);
g_once_init_leave (&cached, langs);
}
return (const GPtrArray *)cached;