[vlc-devel] commit: notify/xosd: potential memleaks ( Rémi Duraffort )
git version control
git at videolan.org
Tue Oct 14 20:47:26 CEST 2008
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Tue Oct 14 20:41:41 2008 +0200| [dec93783572536132403075bf65d62710f4ec7db] | committer: Rémi Duraffort
notify/xosd: potential memleaks
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=dec93783572536132403075bf65d62710f4ec7db
---
modules/misc/notify/xosd.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules/misc/notify/xosd.c b/modules/misc/notify/xosd.c
index dd5dbc6..4e8fe32 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;
}
More information about the vlc-devel
mailing list