Patch 8.2.3544
Problem: Unix: may leak file descriptor when using a non-existing
directory.
Solution: Always close the file. (closes #9023)
Files: src/os_unix.c
*** ../vim-8.2.3543/src/os_unix.c 2021-10-13 10:05:26.863362862 +0100
--- src/os_unix.c 2021-10-20 09:55:51.306497212 +0100
***************
*** 2681,2687 ****
verbose_leave();
}
l = fchdir(fd);
- close(fd);
}
else
#endif
--- 2681,2686 ----
***************
*** 2689,2694 ****
--- 2688,2697 ----
if (l != 0)
emsg(_(e_prev_dir));
}
+ #ifdef HAVE_FCHDIR
+ if (fd >= 0)
+ close(fd);
+ #endif
l = STRLEN(buf);
if (l >= len - 1)
*** ../vim-8.2.3543/src/version.c 2021-10-19 22:12:21.936582330 +0100
--- src/version.c 2021-10-20 09:57:21.899860581 +0100
***************
*** 759,760 ****
--- 759,762 ----
{ /* Add new patch number below this line */
+ /**/
+ 3544,
/**/
--
hundred-and-one symptoms of being an internet addict:
203. You're an active member of more than 20 newsgroups.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/20211020090044.9D675C80053%40moolenaar.net.