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>
This commit is contained in:
Lubomir I. Ivanov 2015-11-03 14:29:36 +02:00 committed by Dirk Hohndel
parent 05ca5051e9
commit 048c5e01b1

View file

@ -311,7 +311,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);