summaryrefslogtreecommitdiff
path: root/tools.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2012-12-03 09:34:12 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2012-12-03 09:34:12 +0100
commite2796948b2abadbb60fca25af2922737c253805a (patch)
tree7fbccee7e45fbf206de5d37732817e2fc881d565 /tools.c
parent441bf300321d5ae6c56a16bf59e88888981f4fa0 (diff)
downloadvdr-e2796948b2abadbb60fca25af2922737c253805a.tar.gz
vdr-e2796948b2abadbb60fca25af2922737c253805a.tar.bz2
Fixed calling iconv_close() only with a valid iconv_t value
Diffstat (limited to 'tools.c')
-rw-r--r--tools.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools.c b/tools.c
index 26c325b6..efb9f164 100644
--- a/tools.c
+++ b/tools.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: tools.c 2.26 2012/09/30 13:04:14 kls Exp $
+ * $Id: tools.c 2.27 2012/12/03 09:31:32 kls Exp $
*/
#include "tools.h"
@@ -842,7 +842,8 @@ cCharSetConv::cCharSetConv(const char *FromCode, const char *ToCode)
cCharSetConv::~cCharSetConv()
{
free(result);
- iconv_close(cd);
+ if (cd != (iconv_t)-1)
+ iconv_close(cd);
}
void cCharSetConv::SetSystemCharacterTable(const char *CharacterTable)