com php-src: Avoid useless duplication: main/php_variables. c

From: Date: Wed, 21 Jun 2017 09:57:24 +0000
Subject: com php-src: Avoid useless duplication: main/php_variables. c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-98150@lists.php.net to get a copy of this message
Commit: 7af5741333925928d83b3921c4f50aebd472c01f Author: Dmitry Stogov <dmitry@zend.com> Wed, 21 Jun 2017 12:57:24 +0300 Parents: c61cea7135f882b9cddef4a7e1a6ce8d51fedd61 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=7af5741333925928d83b3921c4f50aebd472c01f Log: Avoid useless duplication Changed paths: M main/php_variables.c Diff: diff --git a/main/php_variables.c b/main/php_variables.c index ae5e922..1052e16 100644 --- a/main/php_variables.c +++ b/main/php_variables.c @@ -458,7 +458,7 @@ SAPI_API SAPI_TREAT_DATA_FUNC(php_default_treat_data) switch (arg) { case PARSE_GET: case PARSE_STRING: - separator = (char *) estrdup(PG(arg_separator).input); + separator = PG(arg_separator).input; break; case PARSE_COOKIE: separator = ";\0"; @@ -513,10 +513,6 @@ next_cookie: var = php_strtok_r(NULL, separator, &strtok_buf); } - if (arg != PARSE_COOKIE) { - efree(separator); - } - if (free_buffer) { efree(res); }

« previous php.cvs (#98150) next »