From 1750723d84703a661be20e0248ada01f973979bd Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Duraffort?= Date: Wed, 2 Jul 2008 23:47:25 +0200 Subject: [PATCH 1/1] Fix potential segfault. --- modules/gui/ncurses.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/gui/ncurses.c b/modules/gui/ncurses.c index 91c55c6cbd..4d8d03fce4 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; -- 2.39.2