]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
pullup:
authorAndreas Gustafsson <source@isc.org>
Tue, 16 Jan 2001 17:49:53 +0000 (17:49 +0000)
committerAndreas Gustafsson <source@isc.org>
Tue, 16 Jan 2001 17:49:53 +0000 (17:49 +0000)
 683.   [bug]           File descriptor leak in isc_lex_openfile().

CHANGES
lib/isc/lex.c

diff --git a/CHANGES b/CHANGES
index c1a971c9ba75cdfe216c69df7747986c723efba7..a9f05d947e522df24db77082f300fe9c41216432 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,9 +1,11 @@
 
- 680.  [bug]           dns_rdata_fromstruct() mishandled options bigger
-                       than 255 octets.
+ 683.  [bug]           File descriptor leak in isc_lex_openfile().
 
  681.  [bug]           $GENERATE specifying output format was broken. [RT#653]
 
+ 680.  [bug]           dns_rdata_fromstruct() mishandled options bigger
+                       than 255 octets.
+
        --- 9.1.0rc1 released ---
 
  679.  [bug]           $INCLUDE could leak memory and file descriptors on
index 8b014f06dd1f77f7d88be20818d878d448448b91..027a791b363ac5c79eceabc0ec39d2734b9862a6 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: lex.c,v 1.57.4.1 2001/01/09 22:49:02 bwelling Exp $ */
+/* $Id: lex.c,v 1.57.4.2 2001/01/16 17:49:53 gson Exp $ */
 
 #include <config.h>
 
@@ -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