From: Kalle Wallin Date: Fri, 26 Mar 2004 11:06:29 +0000 (+0000) Subject: Updated the logic in charset_close(), why free stuff that isnt allocated. X-Git-Tag: v0.12_alpha1~652 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=8ccbb1a4fc500d7ae746868da85907f4c80f1ea2;p=ncmpc.git Updated the logic in charset_close(), why free stuff that isnt allocated. git-svn-id: https://svn.musicpd.org/ncmpc/trunk@496 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- diff --git a/support.c b/support.c index d7c196a..9bf18cc 100644 --- a/support.c +++ b/support.c @@ -166,12 +166,12 @@ int charset_close(void) { #ifdef HAVE_ICONV - if( iconv_from_uft8 == (iconv_t)(-1) ) + if( iconv_from_uft8 != (iconv_t)(-1) ) { iconv_close(iconv_from_uft8); iconv_from_uft8 = (iconv_t)(-1); } - if( iconv_to_uft8 == (iconv_t)(-1) ) + if( iconv_to_uft8 != (iconv_t)(-1) ) { iconv_close(iconv_to_uft8); iconv_to_uft8 = (iconv_t)(-1);