diff --git a/CHANGES b/CHANGES index 6110ee3e64..1c9c0e7152 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,5 @@ + 683. [bug] file leak in isc_lex_openfile(). + 682. [bug] nslookup displayed SOA records incorrectly. [RT #665] 681. [bug] $GENERATE specifying output format was broken. [RT#653] diff --git a/lib/isc/lex.c b/lib/isc/lex.c index 0bb3186bbf..8cd25a0d0c 100644 --- a/lib/isc/lex.c +++ b/lib/isc/lex.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: lex.c,v 1.59 2001/01/09 21:56:10 bwelling Exp $ */ +/* $Id: lex.c,v 1.60 2001/01/16 07:47:16 marka Exp $ */ #include @@ -240,7 +240,10 @@ isc_lex_openfile(isc_lex_t *lex, const char *filename) { flockfile(stream); #endif - return (new_source(lex, ISC_TRUE, ISC_TRUE, stream, filename)); + result = new_source(lex, ISC_TRUE, ISC_TRUE, stream, filename); + if (result != ISC_R_SUCCESS) + fclose(stream); + return (result); } isc_result_t