]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
fclose origfile and zonefile
authorMark Andrews <marka@isc.org>
Fri, 31 Aug 2018 02:13:19 +0000 (12:13 +1000)
committerMark Andrews <marka@isc.org>
Fri, 31 Aug 2018 02:13:19 +0000 (12:13 +1000)
lib/dns/tests/zt_test.c

index d38d2209fe830905256c60f1a5742ec34c2f1a96..670688d0fe85ffae2df3d08d99a4da6da9617e56 100644 (file)
@@ -178,6 +178,7 @@ ATF_TC_BODY(asyncload_zone, tc) {
        origfile = fopen("./testdata/zt/zone1.db", "r+b");
        ATF_CHECK(origfile != NULL);
        n = fread(buf, 1, 4096, origfile);
+       fclose(origfile);
        fwrite(buf, 1, n, zonefile);
        fflush(zonefile);
 
@@ -203,6 +204,7 @@ ATF_TC_BODY(asyncload_zone, tc) {
         */
        fprintf(zonefile, "\nb in b 1.2.3.4\n");
        fflush(zonefile);
+       fclose(zonefile);
 
        args.arg1 = zone;
        args.arg2 = &done;