mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Fixed some memory leaks in windows.c and main.c
windows.c:subsurface_gettext_domainpath(): - memory at pointer returned from g_win32_getlocale() should be released main.c:setup_system_prefs() - it seems all calls to <os_file>:system_default_filename() return a pre-allocated buffer, therefore we don't need to call strdup() on the result itself. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
a4ae0a4650
commit
2af818bf91
2 changed files with 4 additions and 2 deletions
2
main.c
2
main.c
|
@ -281,7 +281,7 @@ static void setup_system_prefs(void)
|
|||
const char *env;
|
||||
|
||||
default_prefs.divelist_font = strdup(system_divelist_default_font);
|
||||
default_prefs.default_filename = strdup(system_default_filename());
|
||||
default_prefs.default_filename = system_default_filename();
|
||||
|
||||
env = getenv("LC_MEASUREMENT");
|
||||
if (!env)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue