com php-src: fix leak: ext/standard/basic_functions.c
| From: | Pierre Joye | Date: | Thu, 15 May 2014 08:23:50 +0000 |
| Subject: | com php-src: fix leak: ext/standard/basic_functions.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-78366@lists.php.net to get a copy of this message | ||
Commit: 5609bcc75799ca209a4386b998df8c09e2b393aa
Author: Pierre Joye <pierre.php@gmail.com> Thu, 15 May 2014 10:23:50 +0200
Parents: e3e192ca9843ab9e42cc8d849f10309d97b53edb
Branches: phpng
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=5609bcc75799ca209a4386b998df8c09e2b393aa
Log:
fix leak
Changed paths:
M ext/standard/basic_functions.c
Diff:
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index d3b1111..8419dfe 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -4019,7 +4019,9 @@ PHP_FUNCTION(getenv)
efree(ptr);
RETURN_EMPTY_STRING();
} else {
- RETURN_STRING(ptr);
+ RETVAL_STRING(ptr);
+ efree(ptr);
+ return;
}
}
#else