[vlc-commits] Fix potential memory leak.

Rémi Duraffort git at videolan.org
Thu Jan 20 21:03:27 CET 2011


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Thu Jan 20 20:49:06 2011 +0100| [3bf3fdacba1f84b8965e8c1e1443d33fe439f08a] | committer: Rémi Duraffort

Fix potential memory leak.

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

 modules/access/linsys/linsys_hdsdi.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/modules/access/linsys/linsys_hdsdi.c b/modules/access/linsys/linsys_hdsdi.c
index abc2000..3c7752b 100644
--- a/modules/access/linsys/linsys_hdsdi.c
+++ b/modules/access/linsys/linsys_hdsdi.c
@@ -1025,6 +1025,7 @@ static int Capture( demux_t *p_demux )
         if ( read( p_sys->i_vfd, p_buffer, p_sys->i_vbuffer_size ) < 0 )
         {
             msg_Warn( p_demux, "couldn't read %s", strerror(errno) );
+            free( p_buffer );
             return VLC_EGENERIC;
         }
 
@@ -1069,6 +1070,7 @@ static int Capture( demux_t *p_demux )
         if ( read( p_sys->i_afd, p_buffer, p_sys->i_abuffer_size ) < 0 )
         {
             msg_Warn( p_demux, "couldn't read %s", strerror(errno) );
+            free( p_buffer );
             return VLC_EGENERIC;
         }
 



More information about the vlc-commits mailing list