/* 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;
}
if( p_intf->p_sys->p_osd == NULL )
{
msg_Err( p_intf, "couldn't initialize libxosd" );
+ free( p_sys );
return VLC_EGENERIC;
}
#else
if( p_osd == NULL )
{
msg_Err( p_intf, "couldn't initialize libxosd" );
+ free( p_sys );
return VLC_EGENERIC;
}