[vlc-commits] Fix memory leak (cid #1049562)

Rémi Duraffort git at videolan.org
Fri Jul 19 21:49:16 CEST 2013


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Fri Jul 19 21:41:51 2013 +0200| [eed0373932e6af0e9e9ea39cd1342978baff5cff] | committer: Rémi Duraffort

Fix memory leak (cid #1049562)

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

 modules/stream_filter/httplive.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/stream_filter/httplive.c b/modules/stream_filter/httplive.c
index b1898d1..b62949e 100644
--- a/modules/stream_filter/httplive.c
+++ b/modules/stream_filter/httplive.c
@@ -1834,7 +1834,10 @@ static ssize_t read_M3U8_from_stream(stream_t *s, uint8_t **buffer)
         if (bytes == 0)
             break;      /* EOF ? */
         else if (bytes < 0)
+        {
+            free (p);
             return bytes;
+        }
 
         if ( (total_bytes + bytes + 1) > total_allocated )
         {



More information about the vlc-commits mailing list