1
0
mirror of https://github.com/php/php-src.git synced 2026-04-27 01:48:26 +02:00

back to do_alloca(), reverted the wrong replacement

This commit is contained in:
Anatol Belski
2013-10-30 20:13:14 +01:00
parent e17de5e9fd
commit fc707a27ff
+3 -2
View File
@@ -2412,13 +2412,14 @@ PHPAPI int php_execute_script(zend_file_handle *primary_file TSRMLS_DC)
volatile int old_cwd_fd = -1;
#else
char *old_cwd;
ALLOCA_FLAG(use_heap)
#endif
int retval = 0;
EG(exit_status) = 0;
#ifndef HAVE_BROKEN_GETCWD
# define OLD_CWD_SIZE 4096
old_cwd = emalloc(OLD_CWD_SIZE);
old_cwd = do_alloca(OLD_CWD_SIZE, use_heap);
old_cwd[0] = '\0';
#endif
@@ -2499,7 +2500,7 @@ PHPAPI int php_execute_script(zend_file_handle *primary_file TSRMLS_DC)
if (old_cwd[0] != '\0') {
php_ignore_value(VCWD_CHDIR(old_cwd));
}
efree(old_cwd);
do_alloca(old_cwd, use_heap);
#endif
return retval;
}