diff --git a/test cases/common/29 pipeline/srcgen.c b/test cases/common/29 pipeline/srcgen.c index 4d183188a..8095724ab 100644 --- a/test cases/common/29 pipeline/srcgen.c +++ b/test cases/common/29 pipeline/srcgen.c @@ -26,6 +26,7 @@ int main(int argc, char **argv) { ofile = fopen(ofilename, "w"); if(!ofile) { fprintf(stderr, "Could not open target file %s\n", ofilename); + fclose(ifile); return 1; } bytes = fread(arr, 1, ARRSIZE, ifile); diff --git a/test cases/common/30 pipeline/src/srcgen.c b/test cases/common/30 pipeline/src/srcgen.c index c4f4b8772..26761d225 100644 --- a/test cases/common/30 pipeline/src/srcgen.c +++ b/test cases/common/30 pipeline/src/srcgen.c @@ -26,6 +26,7 @@ int main(int argc, char **argv) { ofile = fopen(ofilename, "w"); if(!ofile) { fprintf(stderr, "Could not open target file %s\n", ofilename); + fclose(ifile); return 1; } bytes = fread(arr, 1, ARRSIZE, ifile);