From: Dmitry Stogov Date: Thu, 13 Dec 2012 09:39:42 +0000 (+0400) Subject: Fixed bug #63757 (getenv() produces memory leak with CGI SAPI) X-Git-Tag: php-5.5.0alpha2~21^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=35f86d24d81b81e8c755e82d0b2e76d36f4a0201;p=php Fixed bug #63757 (getenv() produces memory leak with CGI SAPI) --- diff --git a/NEWS b/NEWS index 0504472ae1..dfbcbf064a 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,9 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? 2012, PHP 5.4.11 +- Filter: + . Fixed bug #63757 (getenv() produces memory leak with CGI SAPI). (Dmitry) + - JSON: . Fixed bug #63737 (json_decode does not properly decode with options parameter). (Adam) diff --git a/main/SAPI.c b/main/SAPI.c index fc4b7bee84..e72eafb066 100644 --- a/main/SAPI.c +++ b/main/SAPI.c @@ -1017,7 +1017,7 @@ SAPI_API char *sapi_getenv(char *name, size_t name_len TSRMLS_DC) return NULL; } if (sapi_module.input_filter) { - sapi_module.input_filter(PARSE_ENV, name, &value, strlen(value), NULL TSRMLS_CC); + sapi_module.input_filter(PARSE_STRING, name, &value, strlen(value), NULL TSRMLS_CC); } return value; }