1
0
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:
xjdeng
2025-10-22 15:13:55 +08:00
committed by Mark Adler
parent 202ea98552
commit 8236296e42

View File

@@ -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);
}