diff options
Diffstat (limited to 'main/php_virtual_cwd.c')
| -rw-r--r-- | main/php_virtual_cwd.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/main/php_virtual_cwd.c b/main/php_virtual_cwd.c index 346738e955..1086fa05d8 100644 --- a/main/php_virtual_cwd.c +++ b/main/php_virtual_cwd.c @@ -2,16 +2,15 @@ #include <sys/stat.h> #include <string.h> #include <stdio.h> - -#ifndef PHP_WIN32 -#include <unistd.h> -#endif - #include <limits.h> #include <errno.h> #include <stdlib.h> #include <ctype.h> +#ifndef PHP_WIN32 +#include <unistd.h> +#endif + typedef unsigned int uint; #ifdef PHP_WIN32 @@ -191,6 +190,8 @@ int virtual_chdir(cwd_state *state, char *path) return (1); } + free(old_state->cwd); + free(old_state); return (0); } |
