diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2012-12-03 09:34:12 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2012-12-03 09:34:12 +0100 |
commit | e2796948b2abadbb60fca25af2922737c253805a (patch) | |
tree | 7fbccee7e45fbf206de5d37732817e2fc881d565 /tools.c | |
parent | 441bf300321d5ae6c56a16bf59e88888981f4fa0 (diff) | |
download | vdr-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.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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) |