aboutsummaryrefslogtreecommitdiff
path: root/archival/bzip2.c
diff options
context:
space:
mode:
authorGravatar Denys Vlasenko <vda.linux@googlemail.com>2010-12-30 04:43:35 +0100
committerGravatar Denys Vlasenko <vda.linux@googlemail.com>2010-12-30 04:43:35 +0100
commited9b08d1c1bbccd1bcb2c3e06b0095b6b99dc96c (patch)
treebd9a9b9f6b4ced902e90ec7024ca4c6b4dcd1ec7 /archival/bzip2.c
parent2753aae0e8728f527bedf103b1207857b7c3e151 (diff)
downloadbusybox-ed9b08d1c1bbccd1bcb2c3e06b0095b6b99dc96c.tar.gz
busybox-ed9b08d1c1bbccd1bcb2c3e06b0095b6b99dc96c.tar.bz2
bzip2: plug memory leak on every processed file
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'archival/bzip2.c')
-rw-r--r--archival/bzip2.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/archival/bzip2.c b/archival/bzip2.c
index a6abc931c..ab08ffc1a 100644
--- a/archival/bzip2.c
+++ b/archival/bzip2.c
@@ -128,10 +128,12 @@ IF_DESKTOP(long long) int FAST_FUNC compressStream(unpack_info_t *info UNUSED_PA
break;
}
-#if ENABLE_FEATURE_CLEAN_UP
+ /* Can't be conditional on ENABLE_FEATURE_CLEAN_UP -
+ * we are called repeatedly
+ */
BZ2_bzCompressEnd(strm);
free(iobuf);
-#endif
+
return total;
}