[prev in list] [next in list] [prev in thread] [next in thread]
List: php-cvs
Subject: [PHP-CVS] com php-src: back to =?UTF-8?Q?do=5Falloca=28=29=2C=20reverted=20the=20wr?= =?UTF-8?Q?ong=
From: Anatol Belski <ab () php ! net>
Date: 2013-10-30 19:13:14
Message-ID: php-mail-ac537218ba8cb375e0bbadbadc09613b84673374 () git ! php ! net
[Download RAW message or body]
Commit: fc707a27ff1ede5494318e9d0eafd0ebb87d1d2e
Author: Anatol Belski <ab@php.net> Wed, 30 Oct 2013 20:13:14 +0100
Parents: e17de5e9fd1f25626a6f8bf71a1ad882ac567fa6
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=fc707a27ff1ede5494318e9d0eafd0ebb87d1d2e
Log:
back to do_alloca(), reverted the wrong replacement
Changed paths:
M main/main.c
Diff:
diff --git a/main/main.c b/main/main.c
index 2d018a7..bd5e91b 100644
--- a/main/main.c
+++ b/main/main.c
@@ -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;
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic