From 8ccbb1a4fc500d7ae746868da85907f4c80f1ea2 Mon Sep 17 00:00:00 2001 From: Kalle Wallin Date: Fri, 26 Mar 2004 11:06:29 +0000 Subject: [PATCH] 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 --- support.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); -- 2.30.2