]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
2300. [bug] Fixed failure to close open file in
authorMark Andrews <marka@isc.org>
Mon, 14 Jan 2008 11:47:48 +0000 (11:47 +0000)
committerMark Andrews <marka@isc.org>
Mon, 14 Jan 2008 11:47:48 +0000 (11:47 +0000)
                        bin/tests/names/t_names.c. [RT #17473]

CHANGES
bin/tests/names/t_names.c

diff --git a/CHANGES b/CHANGES
index 83d9bf5b6208218a6cef05fc1b438d625afe23d6..dccd058aa9b492984444d6840e8ce41aa8709f15 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+2300.  [bug]           Fixed failure to close open file in 
+                       bin/tests/names/t_names.c. [RT #17473]
+
 2299.  [bug]           Remove unnecessary NULL check in
                        bin/nsupdate/nsupdate.c. [RT #17475]
 
index fe5e7de62aabc8ea8dd96da790abe382c0504d62..936870529f1b8207e1507823d435ca3f5a313456 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: t_names.c,v 1.43 2007/06/19 23:47:00 tbox Exp $ */
+/* $Id: t_names.c,v 1.44 2008/01/14 11:47:48 marka Exp $ */
 
 #include <config.h>
 
@@ -209,6 +209,7 @@ getmsg(char *datafile_name, unsigned char *buf, int buflen, isc_buffer_t *pbuf)
                else if (('A' <= c) && (c <= 'Z'))
                        val = c - 'A'+ 10;
                else {
+                       (void)fclose(fp);
                        t_info("Bad format in datafile\n");
                        return (0);
                }
@@ -222,6 +223,7 @@ getmsg(char *datafile_name, unsigned char *buf, int buflen, isc_buffer_t *pbuf)
                                /*
                                 * Buffer too small.
                                 */
+                               (void)fclose(fp);
                                t_info("Buffer overflow error\n");
                                return (0);
                        }