mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
cleanup: remove memory leak in initUiLocale()
The prefs.locale.lang_locale field was overwritten without free()ing the old value. Not that the function would be called numerous times, but as a matter of principle... Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
eb55ffde16
commit
0f30ca9b33
1 changed files with 1 additions and 0 deletions
|
@ -483,6 +483,7 @@ void initUiLanguage()
|
|||
uiLang = languages[2];
|
||||
}
|
||||
|
||||
free((void*)prefs.locale.lang_locale);
|
||||
prefs.locale.lang_locale = copy_qstring(uiLang);
|
||||
|
||||
if (!prefs.date_format_override || empty_string(prefs.date_format_short) || empty_string(prefs.date_format)) {
|
||||
|
|
Loading…
Reference in a new issue