From ab45fefcb525ddd4c4d1e915556aeab5dacef36b Mon Sep 17 00:00:00 2001 From: Francois Cartegnie Date: Thu, 31 Dec 2015 18:56:59 +0100 Subject: [PATCH] mux: mp4: check alloc return (cid #1346924) --- modules/mux/mp4/libmp4mux.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/mux/mp4/libmp4mux.c b/modules/mux/mp4/libmp4mux.c index 9c16f1c10b..c566c10117 100644 --- a/modules/mux/mp4/libmp4mux.c +++ b/modules/mux/mp4/libmp4mux.c @@ -80,7 +80,11 @@ bo_t *box_new(const char *fcc) if (!box) return NULL; - bo_init(box, 1024); + if(!bo_init(box, 1024)) + { + bo_free(box); + return NULL; + } bo_add_32be (box, 0); bo_add_fourcc(box, fcc);