diff options
author | Philip Withnall <pwithnall@endlessos.org> | 2021-03-23 16:28:31 +0000 |
---|---|---|
committer | Philip Withnall <pwithnall@endlessos.org> | 2021-03-23 16:33:33 +0000 |
commit | 34e48418546e2a76c991d9780418401437a1af7a (patch) | |
tree | b56102eb51d8b27451ece47dd18c2045f2ffabb9 /glib/gkeyfile.c | |
parent | 164da19983daf92cc9c90b57f1def2fb03f4d4bd (diff) | |
download | glib-34e48418546e2a76c991d9780418401437a1af7a.tar.gz |
gkeyfile: Fix crash when parsing translations on a second load
If the same `GKeyFile` is reused to load multiple different key files,
any loads after the first which encounter translated keys will crash,
because clearing the data from the first load cleared the cached
language names, but didn’t clear `checked_locales`, so they were never
reloaded.
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
Fixes: #2361
Diffstat (limited to 'glib/gkeyfile.c')
-rw-r--r-- | glib/gkeyfile.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/glib/gkeyfile.c b/glib/gkeyfile.c index 06c4b7c47..0b58edb3f 100644 --- a/glib/gkeyfile.c +++ b/glib/gkeyfile.c @@ -648,6 +648,7 @@ g_key_file_clear (GKeyFile *key_file) g_strfreev (key_file->locales); key_file->locales = NULL; } + key_file->checked_locales = FALSE; if (key_file->parse_buffer) { |