From 56e15a3be0b5f982caf8d06bd3dbf88bdece1941 Mon Sep 17 00:00:00 2001 From: Brooss Date: Wed, 25 Feb 2015 16:48:40 +1100 Subject: [PATCH] Call iconv_close. Fix warning --- src/lib_ccx/ts_tables_epg.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib_ccx/ts_tables_epg.c b/src/lib_ccx/ts_tables_epg.c index 0eb29e43..ce13a40f 100644 --- a/src/lib_ccx/ts_tables_epg.c +++ b/src/lib_ccx/ts_tables_epg.c @@ -395,7 +395,7 @@ char* EPG_DVB_decode_string(uint8_t *in, size_t size) { } if((long)cd != -1 && !skipiconv) { - ret = iconv(cd, (const char **)&in, &size, &dp, &obl); + ret = iconv(cd, (char **)&in, &size, &dp, &obl); obl=decode_buffer_size-obl; decode_buffer[obl]=0x00; } @@ -424,6 +424,8 @@ char* EPG_DVB_decode_string(uint8_t *in, size_t size) { memcpy(out, decode_buffer, osize); out[osize]=0x00; free(decode_buffer); + if (cd != (iconv_t)-1) + iconv_close(cd); return out; }