diff options
author | Dmitry Stogov <dmitry@zend.com> | 2018-05-08 17:30:15 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2018-05-08 17:30:15 +0300 |
commit | 524f5245c55223d36d1166554ca894fa77ea2dd1 (patch) | |
tree | aa7e6e9fa7f37afe6cd4b9a3c8ce8d919cd2f15d /ext/zip/php_zip.c | |
parent | 9565075cbd57f226c77745f5e7c915635680784c (diff) | |
download | php-git-524f5245c55223d36d1166554ca894fa77ea2dd1.tar.gz |
Avoid useless checks, using zend_string_efree(), in cases where the string is known to be a temporary allocated zend_string.
Diffstat (limited to 'ext/zip/php_zip.c')
-rw-r--r-- | ext/zip/php_zip.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index afb033f130..815f64ecb4 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -1328,7 +1328,7 @@ static PHP_NAMED_FUNCTION(zif_zip_entry_read) ZSTR_LEN(buffer) = n; RETURN_NEW_STR(buffer); } else { - zend_string_free(buffer); + zend_string_efree(buffer); RETURN_EMPTY_STRING() } } else { @@ -2860,7 +2860,7 @@ static void php_zip_get_from(INTERNAL_FUNCTION_PARAMETERS, int type) /* {{{ */ buffer = zend_string_safe_alloc(1, len, 0, 0); n = zip_fread(zf, ZSTR_VAL(buffer), ZSTR_LEN(buffer)); if (n < 1) { - zend_string_free(buffer); + zend_string_efree(buffer); RETURN_EMPTY_STRING(); } |