From 42cc1a9559e02844ff4b9698b838ec73ea56cc1a Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Thu, 28 May 2026 19:22:16 +0200 Subject: bzip2recover: bsClose bsIn before exit 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 69fc86e..26a9b9d 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; } -- cgit v1.2.3-55-g6feb