Re: com php-src: RETURN_STRING takes the char* only now (always copied): ext/standard/basic_functions.c
| From: | Dmitry Stogov | Date: | Thu, 15 May 2014 08:13:17 +0000 |
| Subject: | Re: com php-src: RETURN_STRING takes the char* only now (always copied): ext/standard/basic_functions.c | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-78362@lists.php.net to get a copy of this message | ||
RETURN_STRING(ptr, 0); can't be just changed into RETURN_STRING(ptr);
it'll produce memory leak
Thanks. Dmitry.
On Thu, May 15, 2014 at 11:56 AM, Pierre Joye <pajoye@php.net> wrote:
> Commit: d8c67496499e5955707ddd99212cf4273bfa2ff7
> Author: Pierre Joye <pierre.php@gmail.com> Thu, 15 May 2014
> 09:56:20 +0200
> Parents: 526c778e91a5ec1bd49a321fd98d06bc81ac9da2
> Branches: phpng
>
> Link:
>
> http://git.php.net/?p=php-src.git;a=commitdiff;h=d8c67496499e5955707ddd99212cf4273bfa2ff7
>
> Log:
> RETURN_STRING takes the char* only now (always copied)
>
> Changed paths:
> M ext/standard/basic_functions.c
>
>
> Diff:
> diff --git a/ext/standard/basic_functions.c
> b/ext/standard/basic_functions.c
> index ef516ef..d3b1111 100644
> --- a/ext/standard/basic_functions.c
> +++ b/ext/standard/basic_functions.c
> @@ -4019,7 +4019,7 @@ PHP_FUNCTION(getenv)
> efree(ptr);
> RETURN_EMPTY_STRING();
> } else {
> - RETURN_STRING(ptr, 0);
> + RETURN_STRING(ptr);
> }
> }
> #else
>
>
> --
> PHP CVS Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>