]> granicus.if.org Git - php/commitdiff
Fixed bug#43105 (PHP seems to fail to close open files.)
authorHannes Magnusson <bjori@php.net>
Thu, 27 Dec 2007 02:09:26 +0000 (02:09 +0000)
committerHannes Magnusson <bjori@php.net>
Thu, 27 Dec 2007 02:09:26 +0000 (02:09 +0000)
main/fopen_wrappers.c

index e0122ff152958f561bad6273ccec08a8ee61ad67..469b5c3e6b6f0f3d43a2e2ed20cc6da02b660a6d 100644 (file)
@@ -620,6 +620,7 @@ PHPAPI char *expand_filepath(const char *filepath, char *real_path TSRMLS_DC)
                                 * relatively referenced file is accessible */
                                copy_len = strlen(filepath) > MAXPATHLEN - 1 ? MAXPATHLEN - 1 : strlen(filepath);
                                real_path = estrndup(filepath, copy_len);
+                               close(fdtest);
                                return real_path;
                        } else {
                                cwd[0] = '\0';