summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sapi/apache/mod_php4.c1
-rw-r--r--sapi/apache2filter/sapi_apache2.c5
-rw-r--r--sapi/nsapi/nsapi.c1
3 files changed, 6 insertions, 1 deletions
diff --git a/sapi/apache/mod_php4.c b/sapi/apache/mod_php4.c
index 690a7c3c8d..3aaa6bafb9 100644
--- a/sapi/apache/mod_php4.c
+++ b/sapi/apache/mod_php4.c
@@ -163,6 +163,7 @@ int sapi_apache_header_handler(sapi_header_struct *sapi_header, sapi_headers_str
header_content = p = strchr(header_name, ':');
if (!p) {
+ efree(sapi_header->header);
return 0;
}
diff --git a/sapi/apache2filter/sapi_apache2.c b/sapi/apache2filter/sapi_apache2.c
index d1253302e9..cb3b8d3701 100644
--- a/sapi/apache2filter/sapi_apache2.c
+++ b/sapi/apache2filter/sapi_apache2.c
@@ -94,7 +94,10 @@ php_apache_sapi_header_handler(sapi_header_struct *sapi_header, sapi_headers_str
val = strchr(sapi_header->header, ':');
- if (!val) return 0;
+ if (!val) {
+ sapi_free_header(sapi_header);
+ return 0;
+ }
*val = '\0';
diff --git a/sapi/nsapi/nsapi.c b/sapi/nsapi/nsapi.c
index d2c3b2db86..2a392ac434 100644
--- a/sapi/nsapi/nsapi.c
+++ b/sapi/nsapi/nsapi.c
@@ -156,6 +156,7 @@ sapi_nsapi_header_handler(sapi_header_struct *sapi_header, sapi_headers_struct *
header_name = sapi_header->header;
header_content = p = strchr(header_name, ':');
if (p == NULL) {
+ efree(sapi_header->header);
return 0;
}