From: Michael Koch Date: Tue, 1 Jul 2003 14:42:38 +0000 (+0000) Subject: 2003-07-01 Michael Koch X-Git-Tag: releases/gcc-3.4.0~5266 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3d8daef2cd4ef4f8c071ed1c9779dbbbe2c4ddc2;p=thirdparty%2Fgcc.git 2003-07-01 Michael Koch * gnu/gcj/convert/natIconv.cc (iconv_init): Fixed possible memory leak by releasing allocated iconv handle. From-SVN: r68774 --- diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 32af90581695..0377102851a8 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,9 @@ +2003-07-01 Michael Koch + + * gnu/gcj/convert/natIconv.cc + (iconv_init): Fixed possible memory leak by releasing allocated iconv + handle. + 2003-06-30 Thomas Fitzsimmons * glib-2.0.m4: New file. diff --git a/libjava/gnu/gcj/convert/natIconv.cc b/libjava/gnu/gcj/convert/natIconv.cc index 0ed8606f94b2..7b7ec64488ec 100644 --- a/libjava/gnu/gcj/convert/natIconv.cc +++ b/libjava/gnu/gcj/convert/natIconv.cc @@ -268,6 +268,9 @@ gnu::gcj::convert::IOConverter::iconv_init (void) // Conversion must be complete for us to use the result. if (r != (size_t) -1 && inc == 0 && outc == 0) result = (c != 0xfeff); + + // Release iconv handle. + iconv_close (handle); } #endif /* HAVE_ICONV */ return result;