[vlc-devel] commit: access_http: fix potential memleak. ( Rémi Duraffort )

git version control git at videolan.org
Sat Jul 4 14:38:43 CEST 2009


vlc | branch: 1.0-bugfix | Rémi Duraffort <ivoire at videolan.org> | Sat Jul  4 13:30:57 2009 +0200| [2c2b9c663c6b1757b4067682e0b2a68be1cb8809] | committer: Rémi Duraffort 

access_http: fix potential memleak.
(cherry picked from commit a829c55839b25d23c563deac905bdb12e128104f)

Signed-off-by: Rémi Duraffort <ivoire at videolan.org>

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

 modules/access/http.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/modules/access/http.c b/modules/access/http.c
index 9952fcf..7c3a06c 100644
--- a/modules/access/http.c
+++ b/modules/access/http.c
@@ -812,7 +812,10 @@ static int ReadICYMeta( access_t *p_access )
     psz_meta = malloc( i_read + 1 );
     if( net_Read( p_access, p_sys->fd, p_sys->p_vs,
                   (uint8_t *)psz_meta, i_read, true ) != i_read )
+    {
+        free( psz_meta );
         return VLC_EGENERIC;
+    }
 
     psz_meta[i_read] = '\0'; /* Just in case */
 




More information about the vlc-devel mailing list