From 524f5245c55223d36d1166554ca894fa77ea2dd1 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 8 May 2018 17:30:15 +0300 Subject: Avoid useless checks, using zend_string_efree(), in cases where the string is known to be a temporary allocated zend_string. --- main/php_variables.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'main/php_variables.c') diff --git a/main/php_variables.c b/main/php_variables.c index 9e7f185bd9..09e5afcf3b 100644 --- a/main/php_variables.c +++ b/main/php_variables.c @@ -600,7 +600,7 @@ PHPAPI void php_build_argv(char *s, zval *track_vars_array) for (i = 0; i < SG(request_info).argc; i++) { ZVAL_STRING(&tmp, SG(request_info).argv[i]); if (zend_hash_next_index_insert(Z_ARRVAL(arr), &tmp) == NULL) { - zend_string_free(Z_STR(tmp)); + zend_string_efree(Z_STR(tmp)); } } } else if (s && *s) { @@ -614,7 +614,7 @@ PHPAPI void php_build_argv(char *s, zval *track_vars_array) ZVAL_STRING(&tmp, ss); count++; if (zend_hash_next_index_insert(Z_ARRVAL(arr), &tmp) == NULL) { - zend_string_free(Z_STR(tmp)); + zend_string_efree(Z_STR(tmp)); } if (space) { *space = '+'; -- cgit v1.2.1