]> granicus.if.org Git - php/commitdiff
- Fix a leak (I think)
authorAndi Gutmans <andi@php.net>
Thu, 16 Mar 2000 18:56:08 +0000 (18:56 +0000)
committerAndi Gutmans <andi@php.net>
Thu, 16 Mar 2000 18:56:08 +0000 (18:56 +0000)
main/php_virtual_cwd.c

index 346738e955e44fb91c44f8ddc1cdc483bceeaeb7..1086fa05d80e6a7cb7054c0d01f41a641b5b756f 100644 (file)
@@ -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);
 }