From 455bb23236b2a3ba3be2e3d8f509f5bb200ca18d Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Fri, 31 Aug 2018 12:13:19 +1000 Subject: [PATCH] fclose origfile and zonefile --- lib/dns/tests/zt_test.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/dns/tests/zt_test.c b/lib/dns/tests/zt_test.c index d38d2209fe..670688d0fe 100644 --- a/lib/dns/tests/zt_test.c +++ b/lib/dns/tests/zt_test.c @@ -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;