mirror of
https://github.com/madler/zlib.git
synced 2026-10-24 02:48:53 +03:00
Fix resource closures in test/minigzip.c.
Not really needed, since exit() is called. But just in case the code is somehow later reused without the exit()'s. (By AI?)
This commit is contained in:
@@ -438,6 +438,7 @@ static void file_compress(char *file, char *mode) {
|
||||
}
|
||||
out = gzopen(outfile, mode);
|
||||
if (out == NULL) {
|
||||
fclose(in);
|
||||
fprintf(stderr, "%s: can't gzopen %s\n", prog, outfile);
|
||||
exit(1);
|
||||
}
|
||||
@@ -480,6 +481,7 @@ static void file_uncompress(char *file) {
|
||||
}
|
||||
out = fopen(outfile, "wb");
|
||||
if (out == NULL) {
|
||||
gzclose(in);
|
||||
perror(file);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user