diff options
| author | Sascha Schumann <sas@php.net> | 2001-08-03 09:50:38 +0000 |
|---|---|---|
| committer | Sascha Schumann <sas@php.net> | 2001-08-03 09:50:38 +0000 |
| commit | f6ed403fde48991afd66ea5eb93573f99b27e34a (patch) | |
| tree | 0af0beedee236ac43a5b606c9dfe17536322ec8d /ext/standard/basic_functions.c | |
| parent | 84aed3b718817b8e90328e38bd5d2fc5847ba365 (diff) | |
| download | php-git-f6ed403fde48991afd66ea5eb93573f99b27e34a.tar.gz | |
Don't copy the strtok parameter
Diffstat (limited to 'ext/standard/basic_functions.c')
| -rw-r--r-- | ext/standard/basic_functions.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 8cea4eeac0..e136a4298c 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -849,6 +849,7 @@ PHP_RINIT_FUNCTION(basic) { memset(BG(strtok_table), 0, 256); BG(strtok_string) = NULL; + BG(strtok_zval) = NULL; BG(locale_string) = NULL; BG(user_compare_func_name) = NULL; BG(array_walk_func_name) = NULL; @@ -892,8 +893,10 @@ PHP_RINIT_FUNCTION(basic) PHP_RSHUTDOWN_FUNCTION(basic) { - STR_FREE(BG(strtok_string)); + if (BG(strtok_zval)) + zval_ptr_dtor(BG(strtok_zval)); BG(strtok_string) = NULL; + BG(strtok_zval) = NULL; #ifdef HAVE_PUTENV zend_hash_destroy(&BG(putenv_ht)); #endif |
