summaryrefslogtreecommitdiff
path: root/main/SAPI.c
diff options
context:
space:
mode:
authorStefan Esser <sesser@php.net>2002-06-18 12:57:09 +0000
committerStefan Esser <sesser@php.net>2002-06-18 12:57:09 +0000
commit28ad564c292dcf7108001e89068efc70ef9597b1 (patch)
treefd3756ea5f3e2b2e25ac12626c2a2910884b7678 /main/SAPI.c
parent303852b42ec8f158361d2f49745aa9ecbfad611c (diff)
downloadphp-git-28ad564c292dcf7108001e89068efc70ef9597b1.tar.gz
keep fingers away from already freed memory.
Diffstat (limited to 'main/SAPI.c')
-rw-r--r--main/SAPI.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/main/SAPI.c b/main/SAPI.c
index 2796f180af..d91e86d009 100644
--- a/main/SAPI.c
+++ b/main/SAPI.c
@@ -558,13 +558,13 @@ SAPI_API int sapi_add_header_ex(char *header_line, uint header_line_len, zend_bo
if (retval & SAPI_HEADER_ADD) {
/* in replace mode first remove the header if it already exists in the headers llist */
if (replace) {
- colon_offset = strchr(header_line, ':');
+ colon_offset = strchr(sapi_header.header, ':');
if (colon_offset) {
char sav;
colon_offset++;
sav = *colon_offset;
*colon_offset = 0;
- zend_llist_del_element(&SG(sapi_headers).headers, header_line, (int(*)(void*, void*))sapi_find_matching_header);
+ zend_llist_del_element(&SG(sapi_headers).headers, sapi_header.header, (int(*)(void*, void*))sapi_find_matching_header);
*colon_offset = sav;
}
}