summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThies C. Arntzen <thies@php.net>2000-02-26 14:21:10 +0000
committerThies C. Arntzen <thies@php.net>2000-02-26 14:21:10 +0000
commitae08e0500e4f9b9cf9c795acc1fbd978df61a8ca (patch)
tree71c793bfa7b05793df00829d79b578294db6d9a9
parenta86e27db95dbc91bb8c4f2bf67a2f187ae2e6f2f (diff)
downloadphp-git-ae08e0500e4f9b9cf9c795acc1fbd978df61a8ca.tar.gz
(sapi_send_headers) fix leak
-rw-r--r--main/SAPI.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/main/SAPI.c b/main/SAPI.c
index 1cd3c43223..885b95553d 100644
--- a/main/SAPI.c
+++ b/main/SAPI.c
@@ -205,6 +205,8 @@ SAPI_API void sapi_get_default_content_type_header(sapi_header_struct *default_h
memcpy(default_header->header, "Content-type: ", sizeof("Content-type: "));
memcpy(default_header->header+sizeof("Content-type: ")-1, default_content_type, default_content_type_len);
default_header->header[default_header->header_len] = 0;
+
+ efree(default_content_type);
}
/*
@@ -444,8 +446,6 @@ SAPI_API int sapi_send_headers()
}
zend_llist_apply_with_argument(&SG(sapi_headers).headers, (void (*)(void *, void *)) sapi_module.send_header, SG(server_context));
if(SG(sapi_headers).send_default_content_type) {
- char *default_content_type = sapi_get_default_content_type(SLS_C);
- int default_content_type_len = strlen(default_content_type);
sapi_header_struct default_header;
sapi_get_default_content_type_header(&default_header SLS_CC);