From 8236296e42776f1a2317eb596a6b9753bbe76159 Mon Sep 17 00:00:00 2001 From: xjdeng Date: Wed, 22 Oct 2025 15:13:55 +0800 Subject: 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?) --- test/minigzip.c | 2 ++ 1 file changed, 2 insertions(+) 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) { } 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); } -- cgit v1.2.3-55-g6feb