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. --- ext/zip/php_zip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ext/zip/php_zip.c') 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(); } -- cgit v1.2.1