From c56c8c43b98902958bc2bf00dc793f1ce23c8536 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Thu, 10 Feb 2000 00:14:54 +0000 Subject: [PATCH] natIconv.cc (Input_iconv::finalize): Call iconv_close when handle is not NULL. * gnu/gcj/convert/natIconv.cc (Input_iconv::finalize): Call iconv_close when handle is not NULL. Thanks to Andrew Haley. (Output_iconv::finalize): Likewise. From-SVN: r31876 --- libjava/ChangeLog | 6 ++++++ libjava/gnu/gcj/convert/natIconv.cc | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/libjava/ChangeLog b/libjava/ChangeLog index e19e4ef3883..94a1543ef55 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,9 @@ +2000-02-09 Tom Tromey + + * gnu/gcj/convert/natIconv.cc (Input_iconv::finalize): Call + iconv_close when handle is not NULL. Thanks to Andrew Haley. + (Output_iconv::finalize): Likewise. + 2000-02-08 Tom Tromey * java/util/Properties.java (setProperty): New method. diff --git a/libjava/gnu/gcj/convert/natIconv.cc b/libjava/gnu/gcj/convert/natIconv.cc index ee3490a99b7..cc8488fa369 100644 --- a/libjava/gnu/gcj/convert/natIconv.cc +++ b/libjava/gnu/gcj/convert/natIconv.cc @@ -47,7 +47,7 @@ void gnu::gcj::convert::Input_iconv::finalize (void) { #ifdef HAVE_ICONV - if (handle == NULL) + if (handle != NULL) { iconv_close ((iconv_t) handle); handle = NULL; @@ -108,7 +108,7 @@ void gnu::gcj::convert::Output_iconv::finalize (void) { #ifdef HAVE_ICONV - if (handle == NULL) + if (handle != NULL) { iconv_close ((iconv_t) handle); handle = NULL;