com php-src: reset also the cwd_length, when cwd is free'd: Zend/zend_virtual_cwd.c
| From: | Anatol Belski | Date: | Wed, 26 Oct 2016 16:06:16 +0000 |
| Subject: | com php-src: reset also the cwd_length, when cwd is free'd: Zend/zend_virtual_cwd.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-95294@lists.php.net to get a copy of this message | ||
Commit: 6679df147a21090d381554375b52917578303f76
Author: Anatol Belski <ab@php.net> Mon, 24 Oct 2016 14:36:17 +0200
Parents: d8f27b2be8498af2505be82f4a0691feea078dba
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=6679df147a21090d381554375b52917578303f76
Log:
reset also the cwd_length, when cwd is free'd
Changed paths:
M Zend/zend_virtual_cwd.c
Diff:
diff --git a/Zend/zend_virtual_cwd.c b/Zend/zend_virtual_cwd.c
index c63e23e..bee1d48 100644
--- a/Zend/zend_virtual_cwd.c
+++ b/Zend/zend_virtual_cwd..c
@@ -141,7 +141,8 @@ static int php_check_dots(const char *element, int n)
memcpy((d)->cwd, (s)->cwd, (s)->cwd_length+1);
#define CWD_STATE_FREE(s) \
- efree((s)->cwd);
+ efree((s)->cwd); \
+ (s)->cwd_length = 0;
#ifdef ZEND_WIN32
# define CWD_STATE_FREE_ERR(state) do { \