From 7af5741333925928d83b3921c4f50aebd472c01f Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Wed, 21 Jun 2017 12:57:24 +0300 Subject: Avoid useless duplication --- main/php_variables.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'main/php_variables.c') diff --git a/main/php_variables.c b/main/php_variables.c index ae5e922ef6..1052e16edf 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); } -- cgit v1.2.1