diff options
author | Lubomir I. Ivanov <neolit123@gmail.com> | 2013-02-09 21:29:56 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-02-09 11:38:51 -0800 |
commit | 2af818bf918a4d07aedf6cc17b5783a2c964b506 (patch) | |
tree | c175bbf17a18a8e68f6d3271fdab51bfac88467b /main.c | |
parent | a4ae0a46501e44c3fb04d6227d721d2036dd6609 (diff) | |
download | subsurface-2af818bf918a4d07aedf6cc17b5783a2c964b506.tar.gz |
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>
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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) |