Commit 7e2b15c0 authored by Anton Khirnov's avatar Anton Khirnov

avfilter: check a malloc in avfilter_link().

Additionally change sizeof(type) into sizeof(var)
parent bf5b5d2b
......@@ -87,8 +87,11 @@ int avfilter_link(AVFilterContext *src, unsigned srcpad,
return AVERROR(EINVAL);
}
src->outputs[srcpad] =
dst-> inputs[dstpad] = link = av_mallocz(sizeof(AVFilterLink));
link = av_mallocz(sizeof(*link));
if (!link)
return AVERROR(ENOMEM);
src->outputs[srcpad] = dst->inputs[dstpad] = link;
link->src = src;
link->dst = dst;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment