summary refs log tree commit diff stats
path: root/src/common
diff options
context:
space:
mode:
authorTingPing <tingping@tingping.se>2014-02-12 09:27:28 -0500
committerTingPing <tingping@tingping.se>2014-02-12 09:27:28 -0500
commit6d815ac688b4517d3d877f9feee428849ae65f6d (patch)
tree60b7ade3e94166cbd589f964f46c93b99b0227d2 /src/common
parent93d0341f9cf6212c13e16c89bd4b227202b44786 (diff)
Fix warning
Diffstat (limited to 'src/common')
-rw-r--r--src/common/cfgfiles.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/common/cfgfiles.c b/src/common/cfgfiles.c
index 68f4126e..47cc9677 100644
--- a/src/common/cfgfiles.c
+++ b/src/common/cfgfiles.c
@@ -722,16 +722,16 @@ get_default_spell_languages (void)
 			g_free(last);
 
 		if (lang_list[0])
-			return ret;
+			return g_strdup (ret);
 	}
 
-	return "en";
+	return g_strdup ("en");
 }
 
 void
 load_default_config(void)
 {
-	const char *username, *realname, *font;
+	const char *username, *realname, *font, *langs;
 	char *sp;
 #ifdef WIN32
 	char out[256];
@@ -905,7 +905,8 @@ load_default_config(void)
 	}
 
 	strcpy (prefs.hex_text_font_alternative, DEF_FONT_ALTER);
-	strcpy (prefs.hex_text_spell_langs, get_default_spell_languages ());
+	langs = get_default_spell_languages ();
+	strcpy (prefs.hex_text_spell_langs, langs);
 
 
 	/* private variables */
@@ -917,6 +918,7 @@ load_default_config(void)
 
 	g_free ((char *)username);
 	g_free ((char *)realname);
+	g_free ((char *)langs);
 }
 
 int