From: Ondřej Surý Date: Thu, 15 Aug 2024 07:28:26 +0000 (+0200) Subject: Add missing fclose() when applying updates failed (rpz/testlib) X-Git-Tag: v9.21.1~39^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2855ec8f5f963a487acc217e7de38f0fbfbc4343;p=thirdparty%2Fbind9.git Add missing fclose() when applying updates failed (rpz/testlib) In rpz system tests, we could leak file if the applying the updates has failed. Add the missing fclose() before returning. --- diff --git a/bin/tests/system/rpz/testlib/test-data.c b/bin/tests/system/rpz/testlib/test-data.c index 3ffbce28fe1..91237d4fef6 100644 --- a/bin/tests/system/rpz/testlib/test-data.c +++ b/bin/tests/system/rpz/testlib/test-data.c @@ -1352,6 +1352,7 @@ load_all_updates(const char *fname, trpz_result_t **presults, size_t *pnresults, { fprintf(stderr, "Error: could not apply update \"%s\"\n", lptr); + fclose(f); return (-1); } }