Commit 95dcd91e authored by Jean-Paul Saman's avatar Jean-Paul Saman

macosx: fix potential memleaks

parent 0392f8be
...@@ -138,6 +138,7 @@ int OpenVideoGL ( vlc_object_t * p_this ) ...@@ -138,6 +138,7 @@ int OpenVideoGL ( vlc_object_t * p_this )
if( NULL == pixFormat ) if( NULL == pixFormat )
{ {
msg_Err( p_vout, "no screen renderer available for required attributes." ); msg_Err( p_vout, "no screen renderer available for required attributes." );
free( p_vout->p_sys );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
...@@ -146,6 +147,7 @@ int OpenVideoGL ( vlc_object_t * p_this ) ...@@ -146,6 +147,7 @@ int OpenVideoGL ( vlc_object_t * p_this )
if( NULL == p_vout->p_sys->agl_ctx ) if( NULL == p_vout->p_sys->agl_ctx )
{ {
msg_Err( p_vout, "cannot create AGL context." ); msg_Err( p_vout, "cannot create AGL context." );
free( p_vout->p_sys );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
else else
...@@ -177,6 +179,7 @@ int OpenVideoGL ( vlc_object_t * p_this ) ...@@ -177,6 +179,7 @@ int OpenVideoGL ( vlc_object_t * p_this )
/* Check to see if initVout: was successfull */ /* Check to see if initVout: was successfull */
if( !p_vout->p_sys->o_vout_view ) if( !p_vout->p_sys->o_vout_view )
{ {
free( p_vout->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