[vlc-commits] http: use vlc_alloc helper

Thomas Guillem git at videolan.org
Sat Nov 11 18:59:44 CET 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Sat Nov 11 18:36:46 2017 +0100| [60a4aacdff79b30c6cca826458667565f8face7d] | committer: Thomas Guillem

http: use vlc_alloc helper

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

 modules/access/http/message.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/access/http/message.c b/modules/access/http/message.c
index 6dbcd0d310..8de2b55f33 100644
--- a/modules/access/http/message.c
+++ b/modules/access/http/message.c
@@ -396,7 +396,7 @@ struct vlc_h2_frame *vlc_http_msg_h2_frame(const struct vlc_http_msg *m,
         assert(strcasecmp(m->headers[j][0], "HTTP2-Settings"));
     }
 
-    const char *(*headers)[2] = malloc((m->count + 5) * sizeof (char *[2]));
+    const char *(*headers)[2] = vlc_alloc(m->count + 5, sizeof (char *[2]));
     if (unlikely(headers == NULL))
         return NULL;
 



More information about the vlc-commits mailing list