tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r675751 - /tomcat/trunk/java/org/apache/catalina/servlets/CGIServlet.java
Date Thu, 10 Jul 2008 21:11:17 GMT
Author: markt
Date: Thu Jul 10 14:11:16 2008
New Revision: 675751

URL: http://svn.apache.org/viewvc?rev=675751&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=42722
Possible NPE in CGIServlet.java
Patch provided by Nils Hammar

Modified:
    tomcat/trunk/java/org/apache/catalina/servlets/CGIServlet.java

Modified: tomcat/trunk/java/org/apache/catalina/servlets/CGIServlet.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/servlets/CGIServlet.java?rev=675751&r1=675750&r2=675751&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/servlets/CGIServlet.java (original)
+++ tomcat/trunk/java/org/apache/catalina/servlets/CGIServlet.java Thu Jul 10 14:11:16 2008
@@ -1728,8 +1728,10 @@
                     }
                 } //replacement for Process.waitFor()
     
-                // Close the output stream used
-                cgiOutput.close();
+                // Close the output stream if used
+                if (cgiOutput != null) {
+                    cgiOutput.close();
+                }
             }
             catch (IOException e){
                 log ("Caught exception " + e);



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message