[vlc-devel] commit: Fix potential segfault. ( Rémi Duraffort )

git version control git at videolan.org
Thu Jul 3 22:53:20 CEST 2008


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Wed Jul  2 23:47:25 2008 +0200| [1750723d84703a661be20e0248ada01f973979bd]

Fix potential segfault.

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

 modules/gui/ncurses.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/modules/gui/ncurses.c b/modules/gui/ncurses.c
index 91c55c6..4d8d03f 100644
--- a/modules/gui/ncurses.c
+++ b/modules/gui/ncurses.c
@@ -246,6 +246,8 @@ static int Open( vlc_object_t *p_this )
 
     /* Allocate instance and initialize some members */
     p_sys = p_intf->p_sys = malloc( sizeof( intf_sys_t ) );
+    if( !p_sys )
+        return VLC_ENOMEM;
     p_sys->p_node = NULL;
     p_sys->p_input = NULL;
     p_sys->f_slider = 0.0;




More information about the vlc-devel mailing list