diff options
author | Valentin Batz <senneth@irssi.org> | 2005-03-07 17:10:45 +0000 |
---|---|---|
committer | vb <vb@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2005-03-07 17:10:45 +0000 |
commit | dca0d7a2bc79ad4f83298ceccfab08598a0edc24 (patch) | |
tree | fb408dd4346c31b8e66670be0b383ffeab2f4801 /src/fe-common | |
parent | e1c7d7e2606f4143fc507ae0ae8790802ea5a7e1 (diff) | |
download | irssi-dca0d7a2bc79ad4f83298ceccfab08598a0edc24.zip |
Use char* instead of const char* in read_settings, so memory can be freed without compiler warnings, by Toby Peterson (related to bug 210)
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3723 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common')
-rw-r--r-- | src/fe-common/core/fe-recode.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/fe-common/core/fe-recode.c b/src/fe-common/core/fe-recode.c index c1b74d0b..a1d0bd6e 100644 --- a/src/fe-common/core/fe-recode.c +++ b/src/fe-common/core/fe-recode.c @@ -152,9 +152,9 @@ static void fe_recode_remove_cmd (const char *data, SERVER_REC *server, WI_ITEM_ static void read_settings(void) { /* preserve the valid values */ - const char *old_term_charset = g_strdup(term_charset); - const char *old_recode_fallback = g_strdup(recode_fallback); - const char *old_recode_out_default = g_strdup(recode_out_default); + char *old_term_charset = g_strdup(term_charset); + char *old_recode_fallback = g_strdup(recode_fallback); + char *old_recode_out_default = g_strdup(recode_out_default); if (recode_fallback) g_free(recode_fallback); @@ -196,6 +196,10 @@ static void read_settings(void) recode_out_default = is_valid_charset(old_recode_out_default) ? g_strdup(old_recode_out_default) : NULL; settings_set_str("recode_out_default_charset", recode_out_default); } + + g_free(old_term_charset); + g_free(old_recode_fallback); + g_free(old_recode_out_default); } static void message_own_public(const SERVER_REC *server, const char *msg, |