From bae750ee441c1fdfd10d81190fdd3346d530059a Mon Sep 17 00:00:00 2001 From: François Revel Date: Sat, 7 Apr 2012 18:32:11 +0000 Subject: Fix a crash when opening Preferences panel and Choices file doesn't exist: - add missing strdup(), - fix free() vs g_free() mixups. svn path=/trunk/netsurf/; revision=13824 --- gtk/gui.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gtk/gui.c') diff --git a/gtk/gui.c b/gtk/gui.c index 200135cf5..36a3de888 100644 --- a/gtk/gui.c +++ b/gtk/gui.c @@ -287,7 +287,7 @@ static void check_options(char **respath) if (nsoption_charp(downloads_directory) == NULL) { LOG(("Using '%s' as download directory", hdir)); - nsoption_set_charp(downloads_directory, hdir); + nsoption_set_charp(downloads_directory, strdup(hdir)); } filepath_sfinddef(respath, buf, "icons/", "~/.netsurf/"); -- cgit v1.2.3