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

Rémi Duraffort git at videolan.org
Sat Jul 13 15:31:25 CEST 2013


vlc/vlc-2.1 | branch: master | Rémi Duraffort <ivoire at videolan.org> | Sat Jul 13 08:24:26 2013 +0200| [e17418df9323e77b8316f2b91c953ad2d0268c81] | committer: Jean-Baptiste Kempf

Fix potential double free (#cid 403064)

(cherry picked from commit 9f895cdaec8e01e1b527fa655088504aa295a9f8)
(cherry picked from commit eb73eec87c833bc8d6e0a448d3ac346c4dd2b81c)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

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

diff --git a/modules/control/rc.c b/modules/control/rc.c
index ee9d183..ee9fd83 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( pi_socket );
+        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