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

Rémi Duraffort git at videolan.org
Sat Jul 20 11:52:40 CEST 2013


vlc/vlc-2.1 | branch: master | Rémi Duraffort <ivoire at videolan.org> | Fri Jul 19 21:41:51 2013 +0200| [978e9ed5c668e4c4cd683cd0a47e8f32991d8c71] | committer: Jean-Baptiste Kempf

Fix memory leak (cid #1049562)

(cherry picked from commit eed0373932e6af0e9e9ea39cd1342978baff5cff)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 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