diff options
author | Vincent Hennebert <vhennebert@apache.org> | 2010-12-16 19:17:21 +0000 |
---|---|---|
committer | Vincent Hennebert <vhennebert@apache.org> | 2010-12-16 19:17:21 +0000 |
commit | 810ab878c482b9d643df01da5bff83240c22b3c7 (patch) | |
tree | b19e6be59d38f442740ff16f7af7e95e3f37b61b /src/java/org/apache/fop/afp | |
parent | 6f9a59a3fdcae9116ae20927e7204c77ea7d40a2 (diff) | |
download | xmlgraphics-fop-810ab878c482b9d643df01da5bff83240c22b3c7.tar.gz xmlgraphics-fop-810ab878c482b9d643df01da5bff83240c22b3c7.zip |
Bugzilla #49060: File Descriptor leak in AFP renderer
Patch by Peter Hancock, applied with minor style modifications
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1050104 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/afp')
-rw-r--r-- | src/java/org/apache/fop/afp/AFPStreamer.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/java/org/apache/fop/afp/AFPStreamer.java b/src/java/org/apache/fop/afp/AFPStreamer.java index 154ca4cc9..65686b92a 100644 --- a/src/java/org/apache/fop/afp/AFPStreamer.java +++ b/src/java/org/apache/fop/afp/AFPStreamer.java @@ -174,6 +174,14 @@ public class AFPStreamer implements Streamable { outputStream.close(); + + if (documentOutputStream != null) { + documentOutputStream.close(); + } + + if (documentFile != null) { + documentFile.close(); + } // delete temporary file tempFile.delete(); } @@ -213,4 +221,4 @@ public class AFPStreamer implements Streamable { // long end = System.currentTimeMillis(); // log.debug("writing time " + (end - start) + "ms"); } -}
\ No newline at end of file +} |