summaryrefslogtreecommitdiff
path: root/ext/iconv
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2018-05-28 16:27:12 +0300
committerDmitry Stogov <dmitry@zend.com>2018-05-28 16:27:12 +0300
commit5eb1f92f31cafc48384f9096012f421b37f6d425 (patch)
tree4ed67b92229407e7b5cbab37b96428fe80eb3f94 /ext/iconv
parent925f05dd1a35eafa71eb29abb69cdfc31a23a75d (diff)
downloadphp-git-5eb1f92f31cafc48384f9096012f421b37f6d425.tar.gz
Use zend_string_release_ex() instread of zend_string_release() in places, where we sure about string persistence.
Diffstat (limited to 'ext/iconv')
-rw-r--r--ext/iconv/iconv.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c
index 34641d882c..7070454433 100644
--- a/ext/iconv/iconv.c
+++ b/ext/iconv/iconv.c
@@ -1340,7 +1340,7 @@ static php_iconv_err_t _php_iconv_mime_encode(smart_str *pretval, const char *fn
smart_str_appendl(pretval, "?=", sizeof("?=") - 1);
char_cnt -= 2;
- zend_string_release(encoded);
+ zend_string_release_ex(encoded, 0);
encoded = NULL;
} break; /* case PHP_ICONV_ENC_SCHEME_BASE64: */
@@ -1462,7 +1462,7 @@ out:
iconv_close(cd_pl);
}
if (encoded != NULL) {
- zend_string_release(encoded);
+ zend_string_release_ex(encoded, 0);
}
if (buf != NULL) {
efree(buf);
@@ -1844,7 +1844,7 @@ static php_iconv_err_t _php_iconv_mime_decode(smart_str *pretval, const char *st
}
err = _php_iconv_appendl(pretval, ZSTR_VAL(decoded_text), ZSTR_LEN(decoded_text), cd);
- zend_string_release(decoded_text);
+ zend_string_release_ex(decoded_text, 0);
if (err != PHP_ICONV_ERR_SUCCESS) {
if ((mode & PHP_ICONV_MIME_DECODE_CONTINUE_ON_ERROR)) {
@@ -2298,7 +2298,7 @@ PHP_FUNCTION(iconv_mime_encode)
}
if (tmp_str) {
- zend_string_release(tmp_str);
+ zend_string_release_ex(tmp_str, 0);
}
}
/* }}} */
@@ -2501,7 +2501,7 @@ PHP_FUNCTION(iconv_set_encoding)
}
retval = zend_alter_ini_entry(name, charset, PHP_INI_USER, PHP_INI_STAGE_RUNTIME);
- zend_string_release(name);
+ zend_string_release_ex(name, 0);
if (retval == SUCCESS) {
RETURN_TRUE;