[vlc-devel] commit: directory: close fd before return (Derk-Jan Hartman )
git version control
git at videolan.org
Sun Oct 12 23:10:48 CEST 2008
vlc | branch: master | Derk-Jan Hartman <hartman at videolan.org> | Sun Oct 12 15:18:19 2008 +0200| [cfcb868669b5497cd096e223b0bf989aefacb3a8] | committer: Derk-Jan Hartman
directory: close fd before return
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cfcb868669b5497cd096e223b0bf989aefacb3a8
---
modules/access/directory.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/modules/access/directory.c b/modules/access/directory.c
index f829443..5ca3915 100644
--- a/modules/access/directory.c
+++ b/modules/access/directory.c
@@ -147,7 +147,10 @@ static int Open( vlc_object_t *p_this )
p_sys = malloc (sizeof (*p_sys));
if (!p_sys)
+ {
+ closedir( handle );
return VLC_ENOMEM;
+ }
p_access->p_sys = p_sys;
p_sys->current = NULL;
More information about the vlc-devel
mailing list