summaryrefslogtreecommitdiff
path: root/ext/standard/basic_functions.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/basic_functions.c')
-rwxr-xr-xext/standard/basic_functions.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index 51a44a3ffb..b2b30a05e4 100755
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -458,7 +458,6 @@ PHP_RINIT_FUNCTION(basic) /* {{{ */
memset(&BG(unserialize), 0, sizeof(BG(unserialize)));
BG(strtok_string) = NULL;
- ZVAL_UNDEF(&BG(strtok_zval));
BG(strtok_last) = NULL;
BG(ctype_string) = NULL;
BG(locale_changed) = 0;
@@ -497,9 +496,10 @@ PHP_RINIT_FUNCTION(basic) /* {{{ */
PHP_RSHUTDOWN_FUNCTION(basic) /* {{{ */
{
- zval_ptr_dtor(&BG(strtok_zval));
- ZVAL_UNDEF(&BG(strtok_zval));
- BG(strtok_string) = NULL;
+ if (BG(strtok_string)) {
+ zend_string_release(BG(strtok_string));
+ BG(strtok_string) = NULL;
+ }
#ifdef HAVE_PUTENV
tsrm_env_lock();
zend_hash_destroy(&BG(putenv_ht));