[vlc-devel] [vlc-commits] file: fix fd leak when opening a directory
Rémi Denis-Courmont
remi at remlab.net
Tue Jun 16 13:25:33 CEST 2015
Le 2015-06-16 14:18, git at videolan.org a écrit :
> 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));
This cannot be right: fdopendir() needs the descriptor. Either this
patch is wrong or some earlier one broke fdopendir().
> #else
> msg_Dbg (p_access, "ignoring directory");
>
> _______________________________________________
> vlc-commits mailing list
> vlc-commits at videolan.org
> https://mailman.videolan.org/listinfo/vlc-commits
--
Rémi Denis-Courmont
http://www.remlab.net/
More information about the vlc-devel
mailing list