]> 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:24:46 +0000 (12:24 +1000)
(cherry picked from commit 455bb23236b2a3ba3be2e3d8f509f5bb200ca18d)

lib/dns/tests/zt_test.c

index bacc7e16cea86f21ab0dbe890bce822dcd82b60d..d2756c2b29810760b859e5ce8087f37026a0b25a 100644 (file)
@@ -177,6 +177,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);
 
@@ -201,6 +202,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;