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

index 265505acf5ba55ba23424042c1c6b27802180ae5..f7a9874401541f3d5cd63b0c39dde90a46892d33 100644 (file)
@@ -592,6 +592,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';