summaryrefslogtreecommitdiff
path: root/sapi
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2021-02-26 02:28:46 +0300
committerDmitry Stogov <dmitry@zend.com>2021-02-26 02:28:46 +0300
commit13e4ce386bb7257dbbe3167b070382ea959ec763 (patch)
treebf73295d32470a3e85d84dc244655f37c550c386 /sapi
parent5e8ae15c3d59f5ee4ca9f51b4ee712e2ada67864 (diff)
downloadphp-git-13e4ce386bb7257dbbe3167b070382ea959ec763.tar.gz
Improve SPL directory and stat() cache using zend_srting* instead of char*
Diffstat (limited to 'sapi')
-rw-r--r--sapi/phpdbg/phpdbg_wait.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sapi/phpdbg/phpdbg_wait.c b/sapi/phpdbg/phpdbg_wait.c
index ec78f18db7..097d4bc6c7 100644
--- a/sapi/phpdbg/phpdbg_wait.c
+++ b/sapi/phpdbg/phpdbg_wait.c
@@ -175,12 +175,12 @@ void phpdbg_webdata_decompress(char *msg, int len) {
if ((zvp = zend_hash_str_find(ht, ZEND_STRL("cwd"))) && Z_TYPE_P(zvp) == IS_STRING) {
if (VCWD_CHDIR(Z_STRVAL_P(zvp)) == SUCCESS) {
- if (BG(CurrentStatFile) && !IS_ABSOLUTE_PATH(BG(CurrentStatFile), strlen(BG(CurrentStatFile)))) {
- efree(BG(CurrentStatFile));
+ if (BG(CurrentStatFile) && !IS_ABSOLUTE_PATH(ZSTR_VAL(BG(CurrentStatFile)), ZSTR_LEN(BG(CurrentStatFile)))) {
+ zend_string_release(BG(CurrentStatFile));
BG(CurrentStatFile) = NULL;
}
- if (BG(CurrentLStatFile) && !IS_ABSOLUTE_PATH(BG(CurrentLStatFile), strlen(BG(CurrentLStatFile)))) {
- efree(BG(CurrentLStatFile));
+ if (BG(CurrentLStatFile) && !IS_ABSOLUTE_PATH(ZSTR_VAL(BG(CurrentLStatFile)), ZSTR_LEN(BG(CurrentLStatFile)))) {
+ zend_string_release(BG(CurrentLStatFile));
BG(CurrentLStatFile) = NULL;
}
}