]> git.sesse.net Git - vlc/commitdiff
macosx: fix potential memleaks
authorJean-Paul Saman <jpsaman@videolan.org>
Tue, 10 Mar 2009 15:51:51 +0000 (16:51 +0100)
committerJean-Paul Saman <jpsaman@videolan.org>
Tue, 17 Mar 2009 13:03:10 +0000 (14:03 +0100)
modules/gui/macosx/voutgl.m

index 1347503748824e61985df5555a6209f5b15f98d1..e46cd8c040f6f756ff21f143e09dbdc31caf1ba4 100644 (file)
@@ -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;
         }