This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/8.5.x by this push: new 96a539e Fix a potential resource leak. 96a539e is described below commit 96a539e2f55d236c75f8335a7cb6fc68a0037ec5 Author: Mark Thomas <ma...@apache.org> AuthorDate: Wed Apr 17 16:01:41 2019 +0100 Fix a potential resource leak. Identified by Coverity scan. --- java/org/apache/catalina/webresources/JarWarResource.java | 2 ++ webapps/docs/changelog.xml | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/java/org/apache/catalina/webresources/JarWarResource.java b/java/org/apache/catalina/webresources/JarWarResource.java index 90321ee..cce1233 100644 --- a/java/org/apache/catalina/webresources/JarWarResource.java +++ b/java/org/apache/catalina/webresources/JarWarResource.java @@ -72,6 +72,8 @@ public class JarWarResource extends AbstractArchiveResource { log.debug(sm.getString("jarResource.getInputStreamFail", getResource().getName(), getBaseUrl()), e); } + // Ensure jarIs is closed if there is an exception + entry = null; return null; } finally { if (entry == null) { diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index d323076..c843b0a 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -59,6 +59,10 @@ Fix a potential concurrency issue in the main Sendfile thread of the APR connector. Identified by Coverity scan. (markt) </fix> + <fix> + Fix a potential resource leak when running a web application from a WAR + file. Identified by Coverity scan. (markt) + </fix> </changelog> </subsection> </section> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org