cvs: php4 /sapi/apache mod_php4.c /sapi/apache2filter sapi_apache2.c /sapi/nsapi nsapi.c
| From: | Stefan Esser | Date: | Fri, 21 Jun 2002 14:48:00 +0000 |
| Subject: | cvs: php4 /sapi/apache mod_php4.c /sapi/apache2filter sapi_apache2.c /sapi/nsapi nsapi.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-12435@lists.php.net to get a copy of this message | ||
sesser Fri Jun 21 10:48:00 2002 EDT
Modified files:
/php4/sapi/apache mod_php4.c
/php4/sapi/apache2filter sapi_apache2.c
/php4/sapi/nsapi nsapi.c
Log:
Fixing the same possible memory leak.
Index: php4/sapi/apache/mod_php4.c
diff -u php4/sapi/apache/mod_php4.c:1.133 php4/sapi/apache/mod_php4.c:1.134
--- php4/sapi/apache/mod_php4.c:1.133 Thu Jun 13 18:13:57 2002
+++ php4/sapi/apache/mod_php4.c Fri Jun 21 10:47:58 2002
@@ -17,7 +17,7 @@
| PHP 4.0 patches by Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: mod_php4.c,v 1.133 2002/06/13 22:13:57 sniper Exp $ */
+/* $Id: mod_php4.c,v 1.134 2002/06/21 14:47:58 sesser Exp $ */
#include "php_apache_http.h"
@@ -163,6 +163,7 @@
header_content = p = strchr(header_name, ':');
if (!p) {
+ efree(sapi_header->header);
return 0;
}
Index: php4/sapi/apache2filter/sapi_apache2.c
diff -u php4/sapi/apache2filter/sapi_apache2.c:1.77 php4/sapi/apache2filter/sapi_apache2.c:1.78
--- php4/sapi/apache2filter/sapi_apache2.c:1.77 Sat Jun 8 14:11:03 2002
+++ php4/sapi/apache2filter/sapi_apache2.c Fri Jun 21 10:47:59 2002
@@ -94,7 +94,10 @@
val = strchr(sapi_header->header, ':');
- if (!val) return 0;
+ if (!val) {
+ sapi_free_header(sapi_header);
+ return 0;
+ }
*val = '\0';
Index: php4/sapi/nsapi/nsapi.c
diff -u php4/sapi/nsapi/nsapi.c:1.25 php4/sapi/nsapi/nsapi.c:1.26
--- php4/sapi/nsapi/nsapi.c:1.25 Tue Dec 11 10:32:02 2001
+++ php4/sapi/nsapi/nsapi.c Fri Jun 21 10:47:59 2002
@@ -156,6 +156,7 @@
header_name = sapi_header->header;
header_content = p = strchr(header_name, ':');
if (p == NULL) {
+ efree(sapi_header->header);
return 0;
}