i18n: Only close valid iconv converters in i18n_done().
authorBen Pfaff <blp@cs.stanford.edu>
Wed, 23 Mar 2011 04:20:04 +0000 (21:20 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Wed, 23 Mar 2011 04:20:04 +0000 (21:20 -0700)
commit213a9dde780d4b31cdcf7dd14f5015633a89cec5
treee794713d383958d0381806893eaf58182316fc77
parent44bce70de3a7d3c2787d0d5cb0b452b5191b38fd
i18n: Only close valid iconv converters in i18n_done().

iconv_open() returns (iconv_t) -1 to indicate an error.  We shouldn't
pass this to iconv_Close().

Reported-by: Jeremy Lavergne <jeremy@lavergne.gotdns.org>.
John Darrington suggested that this was probably the problem, and
Jeremy confirmed it with valgrind.
src/libpspp/i18n.c