[vlc-devel] commit: macosx: fix potential memleaks (Jean-Paul Saman )

git version control git at videolan.org
Tue Mar 17 16:07:53 CET 2009


vlc | branch: master | Jean-Paul Saman <jpsaman at videolan.org> | Tue Mar 10 16:51:51 2009 +0100| [95dcd91e0572ea24877876de49ba0d2ef5b16348] | committer: Jean-Paul Saman 

macosx: fix potential memleaks

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=95dcd91e0572ea24877876de49ba0d2ef5b16348
---

 modules/gui/macosx/voutgl.m |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/modules/gui/macosx/voutgl.m b/modules/gui/macosx/voutgl.m
index 1347503..e46cd8c 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;
         }
 




More information about the vlc-devel mailing list