[vlc-devel] commit: Memory leak (fixes #2442) ( Rémi Denis-Courmont )

git version control git at videolan.org
Sun Feb 1 08:20:39 CET 2009


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Sun Feb  1 09:20:26 2009 +0200| [09f090b183244f2f30ce63af054c1c1439b332ab] | committer: Rémi Denis-Courmont 

Memory leak (fixes #2442)

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

 modules/gui/qnx/vout.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/modules/gui/qnx/vout.c b/modules/gui/qnx/vout.c
index 4b30fe0..f5a01cb 100644
--- a/modules/gui/qnx/vout.c
+++ b/modules/gui/qnx/vout.c
@@ -316,9 +316,16 @@ static int QNXManage( vout_thread_t *p_vout )
 
         if( i_ev == Ph_RESIZE_MSG )
         {
+            PhEvent_t *buf;
+
             i_buflen = PhGetMsgSize( p_event );
-            if( ( p_event = realloc( p_event, i_buflen ) ) == NULL )
+            buf = realloc( p_event, i_buflen );
+            if( buf == NULL )
+            {
+                free( p_event );
                 return( 1 );
+            }
+            p_event = buf;
         }
         else if( i_ev == Ph_EVENT_MSG )
         {




More information about the vlc-devel mailing list