diff --git a/src/ooxml/java/org/apache/poi/openxml4j/opc/OPCPackage.java b/src/ooxml/java/org/apache/poi/openxml4j/opc/OPCPackage.java index 9eaa7c3eae..f055f931dc 100644 --- a/src/ooxml/java/org/apache/poi/openxml4j/opc/OPCPackage.java +++ b/src/ooxml/java/org/apache/poi/openxml4j/opc/OPCPackage.java @@ -455,6 +455,9 @@ public abstract class OPCPackage implements RelationshipSource, Closeable { output.close(); } + // ensure all held resources are freed + revert(); + // Clear this.contentTypeManager.clearAll(); }