[PATCH] bzip2recover: bsClose bsIn before exit
Mark Wielaard
mark@klomp.org
Thu May 28 17:22:16 GMT 2026
This makes sure to cleanup all the memory used and opened file
descriptors.
With this fix valgrind shows no more "leaked" file descriptors or
memory when run with --leak-check=full --show-leak-kinds=all
--track-fds=yes on a valid bzip2 file.
---
bzip2recover.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/bzip2recover.c b/bzip2recover.c
index c62210373fe5..6144284e6c04 100644
--- a/bzip2recover.c
+++ b/bzip2recover.c
@@ -508,6 +508,8 @@ Int32 main ( Int32 argc, Char** argv )
}
}
+ bsClose ( bsIn );
+
fprintf ( stderr, "%s: finished\n", progName );
return 0;
}
--
2.54.0
More information about the Bzip2-devel
mailing list