From: Jean-Paul Saman Date: Tue, 10 Mar 2009 15:51:51 +0000 (+0100) Subject: macosx: fix potential memleaks X-Git-Tag: 1.0.0-pre1~42 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=95dcd91e0572ea24877876de49ba0d2ef5b16348;p=vlc macosx: fix potential memleaks --- diff --git a/modules/gui/macosx/voutgl.m b/modules/gui/macosx/voutgl.m index 1347503748..e46cd8c040 100644 --- a/modules/gui/macosx/voutgl.m +++ b/modules/gui/macosx/voutgl.m @@ -138,6 +138,7 @@ int OpenVideoGL ( vlc_object_t * p_this ) if( NULL == pixFormat ) { msg_Err( p_vout, "no screen renderer available for required attributes." ); + free( p_vout->p_sys ); return VLC_EGENERIC; } @@ -146,6 +147,7 @@ int OpenVideoGL ( vlc_object_t * p_this ) if( NULL == p_vout->p_sys->agl_ctx ) { msg_Err( p_vout, "cannot create AGL context." ); + free( p_vout->p_sys ); return VLC_EGENERIC; } else @@ -177,6 +179,7 @@ int OpenVideoGL ( vlc_object_t * p_this ) /* Check to see if initVout: was successfull */ if( !p_vout->p_sys->o_vout_view ) { + free( p_vout->p_sys ); return VLC_EGENERIC; }