Additionally change sizeof(type) into sizeof(var)
Showing the changes to libavfilter/avfilter.c (1 of 1 file). Show all
Unified · Split
| @@ -87,8 +87,11 @@ int avfilter_link(AVFilterContext *src, unsigned srcpad, · 86 unmodified lines | ||
| 87 | 87 | return AVERROR(EINVAL); |
| 88 | 88 | } |
| 89 | 89 | |
| 90 | − src->outputs[srcpad] = | |
| 91 | − dst-> inputs[dstpad] = link = av_mallocz(sizeof(AVFilterLink)); | |
| 90 | + link = av_mallocz(sizeof(*link)); | |
| 91 | + if (!link) | |
| 92 | + return AVERROR(ENOMEM); | |
| 93 | + | |
| 94 | + src->outputs[srcpad] = dst->inputs[dstpad] = link; | |
| 92 | 95 | |
| 93 | 96 | link->src = src; |
| 94 | 97 | link->dst = dst; |