Skip to content

Commit a612315

Browse files
committed
Fixed memory leak
1 parent 13f0c8b commit a612315

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ext/standard/basic_functions.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4031,7 +4031,9 @@ PHP_FUNCTION(getenv)
40314031
ptr = sapi_getenv(str, str_len TSRMLS_CC);
40324032
if (ptr) {
40334033
//??? RETURN_STRING(ptr, 0);
4034-
RETURN_STRING(ptr);
4034+
RETVAL_STRING(ptr);
4035+
efree(ptr);
4036+
return;
40354037
}
40364038
#ifdef PHP_WIN32
40374039
{

0 commit comments

Comments
 (0)