Commit dec93783 authored by Rémi Duraffort's avatar Rémi Duraffort

notify/xosd: potential memleaks

parent 00d63f8f
...@@ -113,14 +113,12 @@ static int Open( vlc_object_t *p_this ) ...@@ -113,14 +113,12 @@ static int Open( vlc_object_t *p_this )
/* Allocate instance and initialize some members */ /* Allocate instance and initialize some members */
p_intf->p_sys = (intf_sys_t *)malloc( sizeof( intf_sys_t ) ); p_intf->p_sys = (intf_sys_t *)malloc( sizeof( intf_sys_t ) );
if( p_intf->p_sys == NULL ) if( p_intf->p_sys == NULL )
{
msg_Err( p_intf, "out of memory" );
return VLC_ENOMEM; return VLC_ENOMEM;
}
if( getenv( "DISPLAY" ) == NULL ) if( getenv( "DISPLAY" ) == NULL )
{ {
msg_Err( p_intf, "no display, please set the DISPLAY variable" ); msg_Err( p_intf, "no display, please set the DISPLAY variable" );
free( p_sys );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
...@@ -136,6 +134,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -136,6 +134,7 @@ static int Open( vlc_object_t *p_this )
if( p_intf->p_sys->p_osd == NULL ) if( p_intf->p_sys->p_osd == NULL )
{ {
msg_Err( p_intf, "couldn't initialize libxosd" ); msg_Err( p_intf, "couldn't initialize libxosd" );
free( p_sys );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
#else #else
...@@ -143,6 +142,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -143,6 +142,7 @@ static int Open( vlc_object_t *p_this )
if( p_osd == NULL ) if( p_osd == NULL )
{ {
msg_Err( p_intf, "couldn't initialize libxosd" ); msg_Err( p_intf, "couldn't initialize libxosd" );
free( p_sys );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment