com php-src: simplify the state free macros: Zend/zend_virtua l_cwd.c
| From: | Anatol Belski | Date: | Thu, 31 Oct 2013 16:39:17 +0000 |
| Subject: | com php-src: simplify the state free macros: Zend/zend_virtua l_cwd.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-73870@lists.php.net to get a copy of this message | ||
Commit: 4d430ecb02447f3a94571216b800dfef0e48b400
Author: Anatol Belski <ab@php.net> Thu, 31 Oct 2013 17:39:17 +0100
Parents: abb962d54d8a4d22095975d94cda7ea5d2c56fa8
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=4d430ecb02447f3a94571216b800dfef0e48b400
Log:
simplify the state free macros
Changed paths:
M Zend/zend_virtual_cwd.c
Diff:
diff --git a/Zend/zend_virtual_cwd.c b/Zend/zend_virtual_cwd.c
index f281606..4478cd3 100644
--- a/Zend/zend_virtual_cwd.c
+++ b/Zend/zend_virtual_cwd.c
@@ -153,8 +153,7 @@ 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); \
- (s)->cwd = NULL;
+ efree((s)->cwd);
#ifdef TSRM_WIN32
# define CWD_STATE_FREE_ERR(state) do { \
@@ -514,6 +513,7 @@ CWD_API int virtual_cwd_deactivate(TSRMLS_D) /* {{{ */
{
if (CWDG(cwd).cwd != NULL) {
CWD_STATE_FREE(&CWDG(cwd));
+ CWDG(cwd).cwd = NULL;
}
return 0;
}