[vlc-commits] https: leak on alloc error
    Rémi Denis-Courmont 
    git at videolan.org
       
    Thu Dec 31 15:02:50 CET 2015
    
    
  
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Dec 31 16:02:16 2015 +0200| [0134928b800c8e8ffb09359d45fec698f9f30f7a] | committer: Rémi Denis-Courmont
https: leak on alloc error
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0134928b800c8e8ffb09359d45fec698f9f30f7a
---
 modules/access/http/hpack.c |    3 +++
 1 file changed, 3 insertions(+)
diff --git a/modules/access/http/hpack.c b/modules/access/http/hpack.c
index 6a75232..119280f 100644
--- a/modules/access/http/hpack.c
+++ b/modules/access/http/hpack.c
@@ -415,7 +415,10 @@ static int hpack_append_hdr(struct hpack_decoder *dec,
     char **newtab = realloc(dec->table,
                             sizeof (dec->table[0]) * (dec->entries + 1));
     if (newtab == NULL)
+    {
+        free(entry);
         return -1;
+    }
 
     dec->table = newtab;
     dec->table[dec->entries] = entry;
    
    
More information about the vlc-commits
mailing list