[vlc-commits] dbus: fix file descriptors leak
Rémi Denis-Courmont
git at videolan.org
Sat Aug 16 12:50:02 CEST 2014
vlc/vlc-2.2 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Aug 16 13:48:17 2014 +0300| [c7137692365d5da29b19575d09c584ac115b3ee2] | committer: Rémi Denis-Courmont
dbus: fix file descriptors leak
(cherry picked from commit 67aa058beb6ee58181c821ff217dfda1d5a36363)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=c7137692365d5da29b19575d09c584ac115b3ee2
---
modules/control/dbus/dbus.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/modules/control/dbus/dbus.c b/modules/control/dbus/dbus.c
index e371442..87277cd 100644
--- a/modules/control/dbus/dbus.c
+++ b/modules/control/dbus/dbus.c
@@ -192,6 +192,8 @@ static int Open( vlc_object_t *p_this )
msg_Err( p_this, "Failed to connect to the D-Bus session daemon: %s",
error.message );
dbus_error_free( &error );
+ close( p_sys->p_pipe_fds[1] );
+ close( p_sys->p_pipe_fds[0] );
free( p_sys );
return VLC_EGENERIC;
}
@@ -288,6 +290,8 @@ error:
vlc_mutex_destroy( &p_sys->lock );
+ close( p_sys->p_pipe_fds[1] );
+ close( p_sys->p_pipe_fds[0] );
free( p_sys );
return VLC_ENOMEM;
}
@@ -339,6 +343,8 @@ static void Close ( vlc_object_t *p_this )
vlc_array_destroy( p_sys->p_events );
vlc_array_destroy( p_sys->p_timeouts );
vlc_array_destroy( p_sys->p_watches );
+ close( p_sys->p_pipe_fds[1] );
+ close( p_sys->p_pipe_fds[0] );
free( p_sys );
}
More information about the vlc-commits
mailing list