diff options
author | Andi Gutmans <andi@php.net> | 2000-08-27 19:20:53 +0000 |
---|---|---|
committer | Andi Gutmans <andi@php.net> | 2000-08-27 19:20:53 +0000 |
commit | eea3a56973eb80db93edbf4784c8f6f54cc1bb07 (patch) | |
tree | c3ef174a458420472ecde7c7e1828ed53026681f | |
parent | 58abfc54269068337c41d4ea8931c9bbbf5128e5 (diff) | |
download | php-git-eea3a56973eb80db93edbf4784c8f6f54cc1bb07.tar.gz |
- This should be more efficient.
- Post 4.0.2 it's time to move the whole opened_path and virtual stuff
- to emalloc() and friends including some alloca() improvements where
- possible but I don't want to break anything before
-rw-r--r-- | main/php_virtual_cwd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/main/php_virtual_cwd.c b/main/php_virtual_cwd.c index 054be6d044..6de1764033 100644 --- a/main/php_virtual_cwd.c +++ b/main/php_virtual_cwd.c @@ -416,14 +416,14 @@ CWD_API int virtual_chdir_file(const char *path, int (*p_chdir)(const char *path if (length == COPY_WHEN_ABSOLUTE && IS_ABSOLUTE_PATH(path, length+1)) { /* Also use trailing slash if this is absolute */ length++; } - temp = (char *) malloc(length+1); + temp = (char *) do_alloca(length+1); memcpy(temp, path, length); temp[length] = 0; #if VIRTUAL_CWD_DEBUG fprintf (stderr, "Changing directory to %s\n", temp); #endif retval = p_chdir(temp); - free(temp); + free_alloca(temp); return retval; } |