From d4005247812dc31069fb2d28098e68e44a18e82c Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Wed, 6 Aug 2014 21:49:03 +0300 Subject: [PATCH] Fix a few resource leaks in a fit of OCD. --- test cases/common/29 pipeline/srcgen.c | 1 + test cases/common/30 pipeline/src/srcgen.c | 1 + 2 files changed, 2 insertions(+) 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);