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.

(cherry picked from commit 2855ec8f5f)
This commit is contained in:
Ondřej Surý
2024-08-15 09:28:26 +02:00
parent e3cc5034ab
commit f1405af84c

View File

@@ -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);
}
}