aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2015-11-03 14:29:36 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-12-06 09:21:40 -0800
commit9a3532b0cd59a200dd8e4400013928960f50beef (patch)
tree10643e202979d11f8799f14ff72bc80d65de7ef6
parentffc8e0a6615ae7cdd27cb9d36a9f08a493b110ec (diff)
downloadsubsurface-9a3532b0cd59a200dd8e4400013928960f50beef.tar.gz
subsurfacestartup.c: don't double free 'default_filename'
'default_filename' is obtained from system_default_filename() but system_default_filename() returns a static pointer the HEAP memory of which is handled in main(). Remove the free() for 'default_filename' free_prefs() to prevent a double free(). Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--subsurfacestartup.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/subsurfacestartup.c b/subsurfacestartup.c
index 1286885ee..580d8bc84 100644
--- a/subsurfacestartup.c
+++ b/subsurfacestartup.c
@@ -308,7 +308,6 @@ void copy_prefs(struct preferences *src, struct preferences *dest)
*/
void free_prefs(void)
{
- free((void*)prefs.default_filename);
free((void*)prefs.default_cylinder);
free((void*)prefs.divelist_font);
free((void*)prefs.cloud_storage_password);