[vlc-commits] v4l2: use vlc_alloc helper

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


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Sat Nov 11 18:40:14 2017 +0100| [56ac9dee8a72afd9f759aa2760586c9539a3640e] | committer: Thomas Guillem

v4l2: use vlc_alloc helper

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

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

diff --git a/modules/access/v4l2/video.c b/modules/access/v4l2/video.c
index 2bfdf62270..26b67d3450 100644
--- a/modules/access/v4l2/video.c
+++ b/modules/access/v4l2/video.c
@@ -673,7 +673,7 @@ struct buffer_t *StartMmap (vlc_object_t *obj, int fd, uint32_t *restrict n)
         return NULL;
     }
 
-    struct buffer_t *bufv = malloc (req.count * sizeof (*bufv));
+    struct buffer_t *bufv = vlc_alloc (req.count, sizeof (*bufv));
     if (unlikely(bufv == NULL))
         return NULL;
 



More information about the vlc-commits mailing list