diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/minigzip.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/minigzip.c b/test/minigzip.c index 541f3716..1855575a 100644 --- a/test/minigzip.c +++ b/test/minigzip.c | |||
| @@ -438,6 +438,7 @@ static void file_compress(char *file, char *mode) { | |||
| 438 | } | 438 | } |
| 439 | out = gzopen(outfile, mode); | 439 | out = gzopen(outfile, mode); |
| 440 | if (out == NULL) { | 440 | if (out == NULL) { |
| 441 | fclose(in); | ||
| 441 | fprintf(stderr, "%s: can't gzopen %s\n", prog, outfile); | 442 | fprintf(stderr, "%s: can't gzopen %s\n", prog, outfile); |
| 442 | exit(1); | 443 | exit(1); |
| 443 | } | 444 | } |
| @@ -480,6 +481,7 @@ static void file_uncompress(char *file) { | |||
| 480 | } | 481 | } |
| 481 | out = fopen(outfile, "wb"); | 482 | out = fopen(outfile, "wb"); |
| 482 | if (out == NULL) { | 483 | if (out == NULL) { |
| 484 | gzclose(in); | ||
| 483 | perror(file); | 485 | perror(file); |
| 484 | exit(1); | 486 | exit(1); |
| 485 | } | 487 | } |
