From 28ad564c292dcf7108001e89068efc70ef9597b1 Mon Sep 17 00:00:00 2001 From: Stefan Esser Date: Tue, 18 Jun 2002 12:57:09 +0000 Subject: [PATCH] keep fingers away from already freed memory. --- main/SAPI.c | 4 ++-- 1 file 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; } } -- 2.40.0