diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-03-22 16:45:34 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-03-22 12:01:09 -0700 |
commit | 0f30ca9b3359200e660422851033a7534471f3f6 (patch) | |
tree | 97c728ac6f661effac3a8f4d29fcc25b465a19de /core | |
parent | eb55ffde16f0f3c1df4c97c5229165acfda5637d (diff) | |
download | subsurface-0f30ca9b3359200e660422851033a7534471f3f6.tar.gz |
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>
Diffstat (limited to 'core')
-rw-r--r-- | core/qthelper.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/qthelper.cpp b/core/qthelper.cpp index 3321a3387..7e3b58b11 100644 --- a/core/qthelper.cpp +++ b/core/qthelper.cpp @@ -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)) { |