[vlc-commits] file: fix fd leak when opening a directory

Thomas Guillem git at videolan.org
Tue Jun 16 13:18:32 CEST 2015


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Jun 16 13:17:36 2015 +0200| [b9704c0b3cb12dc43cbf368515a53f9d4e3a6f57] | committer: Thomas Guillem

file: fix fd leak when opening a directory

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b9704c0b3cb12dc43cbf368515a53f9d4e3a6f57
---

 modules/access/file.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/modules/access/file.c b/modules/access/file.c
index 816fd32..04fc783 100644
--- a/modules/access/file.c
+++ b/modules/access/file.c
@@ -205,6 +205,7 @@ int FileOpen( vlc_object_t *p_this )
     if (S_ISDIR (st.st_mode))
     {
 #ifdef HAVE_FDOPENDIR
+        close(fd);
         return DirOpen (VLC_OBJECT(p_access));
 #else
         msg_Dbg (p_access, "ignoring directory");



More information about the vlc-commits mailing list