diff options
| author | Mark Wielaard <mark@klomp.org> | 2026-05-28 19:22:16 +0200 |
|---|---|---|
| committer | Mark Wielaard <mark@klomp.org> | 2026-06-11 23:16:46 +0200 |
| commit | 42cc1a9559e02844ff4b9698b838ec73ea56cc1a (patch) | |
| tree | 7615122830f228d630112efcc03d5ce15c4e3488 | |
| parent | 4d3533d71c26968fd113cc8d50e6f0c48475b7a9 (diff) | |
| download | bzip2-42cc1a9559e02844ff4b9698b838ec73ea56cc1a.tar.gz bzip2-42cc1a9559e02844ff4b9698b838ec73ea56cc1a.tar.bz2 bzip2-42cc1a9559e02844ff4b9698b838ec73ea56cc1a.zip | |
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.
| -rw-r--r-- | bzip2recover.c | 2 |
1 files changed, 2 insertions, 0 deletions
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 ) | |||
| 508 | } | 508 | } |
| 509 | } | 509 | } |
| 510 | 510 | ||
| 511 | bsClose ( bsIn ); | ||
| 512 | |||
| 511 | fprintf ( stderr, "%s: finished\n", progName ); | 513 | fprintf ( stderr, "%s: finished\n", progName ); |
| 512 | return 0; | 514 | return 0; |
| 513 | } | 515 | } |
