diff options
author | TingPing <tingping@tingping.se> | 2014-02-12 09:27:28 -0500 |
---|---|---|
committer | TingPing <tingping@tingping.se> | 2014-02-12 09:27:28 -0500 |
commit | 6d815ac688b4517d3d877f9feee428849ae65f6d (patch) | |
tree | 60b7ade3e94166cbd589f964f46c93b99b0227d2 | |
parent | 93d0341f9cf6212c13e16c89bd4b227202b44786 (diff) |
Fix warning
-rw-r--r-- | src/common/cfgfiles.c | 10 |
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 |