From: Anatol Belski Date: Thu, 31 Oct 2013 16:39:17 +0000 (+0100) Subject: simplify the state free macros X-Git-Tag: php-5.6.0alpha1~211^2~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4d430ecb02447f3a94571216b800dfef0e48b400;p=php simplify the state free macros --- diff --git a/Zend/zend_virtual_cwd.c b/Zend/zend_virtual_cwd.c index f281606f9d..4478cd3809 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; }