[vlc-commits] Fix potential double free (#cid 403064)

Rémi Duraffort git at videolan.org
Sat Jul 13 08:43:16 CEST 2013


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Sat Jul 13 08:24:26 2013 +0200| [9f895cdaec8e01e1b527fa655088504aa295a9f8] | committer: Rémi Duraffort

Fix potential double free (#cid 403064)

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

 modules/control/rc.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/modules/control/rc.c b/modules/control/rc.c
index ee9d183..e8629d6 100644
--- a/modules/control/rc.c
+++ b/modules/control/rc.c
@@ -320,7 +320,11 @@ static int Activate( vlc_object_t *p_this )
 
     intf_sys_t *p_sys = malloc( sizeof( *p_sys ) );
     if( unlikely(p_sys == NULL) )
+    {
+        net_ListenClose( p_sys->pi_socket_listen );
+        free( psz_unix_path );
         return VLC_ENOMEM;
+    }
 
     p_intf->p_sys = p_sys;
     p_sys->pi_socket_listen = pi_socket;



More information about the vlc-commits mailing list