diff --git a/WHATSNEW b/WHATSNEW index 6ccdfc706..b4c78519e 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -57,6 +57,7 @@ Fixed bugs: * ZipFile failed to clean up some resources which could lead to OutOfMemoryException while unzipping large archives. + A similar problem in ZipArchiveOutputStream has been fixed as well. Bugzilla Report 42969. * quiet attribute added to the copy and move tasks, to be used together diff --git a/src/main/org/apache/tools/zip/ZipOutputStream.java b/src/main/org/apache/tools/zip/ZipOutputStream.java index c9e3125fa..c1d73b3df 100644 --- a/src/main/org/apache/tools/zip/ZipOutputStream.java +++ b/src/main/org/apache/tools/zip/ZipOutputStream.java @@ -409,6 +409,7 @@ public class ZipOutputStream extends FilterOutputStream { writeCentralDirectoryEnd(); offsets.clear(); entries.clear(); + def.end(); } /**