ref: 60cc1b8b9eab94545d9a41dca25b123da924442b
parent: 9caf90425b741d80ad46ff0eb84fda79fc3990e6
author: Derek Buitenhuis <[email protected]>
date: Tue Oct 2 09:26:13 EDT 2018
lib: Fix unchecked malloc Signed-off-by: Derek Buitenhuis <[email protected]>
--- a/src/lib.c
+++ b/src/lib.c
@@ -86,6 +86,7 @@
if (c->n_fc > 1) {
c->frame_thread.out_delayed =
malloc(sizeof(*c->frame_thread.out_delayed) * c->n_fc);
+ if (!c->frame_thread.out_delayed) goto error;
memset(c->frame_thread.out_delayed, 0,
sizeof(*c->frame_thread.out_delayed) * c->n_fc);
}