Fix a few resource leaks in a fit of OCD.

pull/15/head
Jussi Pakkanen 11 years ago
parent 55759e4aa9
commit d400524781
  1. 1
      test cases/common/29 pipeline/srcgen.c
  2. 1
      test cases/common/30 pipeline/src/srcgen.c

@ -26,6 +26,7 @@ int main(int argc, char **argv) {
ofile = fopen(ofilename, "w"); ofile = fopen(ofilename, "w");
if(!ofile) { if(!ofile) {
fprintf(stderr, "Could not open target file %s\n", ofilename); fprintf(stderr, "Could not open target file %s\n", ofilename);
fclose(ifile);
return 1; return 1;
} }
bytes = fread(arr, 1, ARRSIZE, ifile); bytes = fread(arr, 1, ARRSIZE, ifile);

@ -26,6 +26,7 @@ int main(int argc, char **argv) {
ofile = fopen(ofilename, "w"); ofile = fopen(ofilename, "w");
if(!ofile) { if(!ofile) {
fprintf(stderr, "Could not open target file %s\n", ofilename); fprintf(stderr, "Could not open target file %s\n", ofilename);
fclose(ifile);
return 1; return 1;
} }
bytes = fread(arr, 1, ARRSIZE, ifile); bytes = fread(arr, 1, ARRSIZE, ifile);

Loading…
Cancel
Save