X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fmisc%2Fnotify%2Fxosd.c;fp=modules%2Fmisc%2Fnotify%2Fxosd.c;h=4e8fe32125cf84a2c18ae5e3ae2201b5fdb50e17;hb=dec93783572536132403075bf65d62710f4ec7db;hp=dd5dbc6888fb5ce676c96ef106883530a360d728;hpb=00d63f8fa96376ac8f2bdee549d1360b4a34e945;p=vlc diff --git a/modules/misc/notify/xosd.c b/modules/misc/notify/xosd.c index dd5dbc6888..4e8fe32125 100644 --- a/modules/misc/notify/xosd.c +++ b/modules/misc/notify/xosd.c @@ -113,14 +113,12 @@ static int Open( vlc_object_t *p_this ) /* Allocate instance and initialize some members */ p_intf->p_sys = (intf_sys_t *)malloc( sizeof( intf_sys_t ) ); if( p_intf->p_sys == NULL ) - { - msg_Err( p_intf, "out of memory" ); return VLC_ENOMEM; - } if( getenv( "DISPLAY" ) == NULL ) { msg_Err( p_intf, "no display, please set the DISPLAY variable" ); + free( p_sys ); return VLC_EGENERIC; } @@ -136,6 +134,7 @@ static int Open( vlc_object_t *p_this ) if( p_intf->p_sys->p_osd == NULL ) { msg_Err( p_intf, "couldn't initialize libxosd" ); + free( p_sys ); return VLC_EGENERIC; } #else @@ -143,6 +142,7 @@ static int Open( vlc_object_t *p_this ) if( p_osd == NULL ) { msg_Err( p_intf, "couldn't initialize libxosd" ); + free( p_sys ); return VLC_EGENERIC; }