Fixed memory leak

This commit is contained in:
Dmitry Stogov 2014-04-11 18:15:53 +04:00
parent 13f0c8b18c
commit a6123151c7

View file

@ -4031,7 +4031,9 @@ PHP_FUNCTION(getenv)
ptr = sapi_getenv(str, str_len TSRMLS_CC); ptr = sapi_getenv(str, str_len TSRMLS_CC);
if (ptr) { if (ptr) {
//??? RETURN_STRING(ptr, 0); //??? RETURN_STRING(ptr, 0);
RETURN_STRING(ptr); RETVAL_STRING(ptr);
efree(ptr);
return;
} }
#ifdef PHP_WIN32 #ifdef PHP_WIN32
{ {