History

avfilter: check a malloc in avfilter_link().

Additionally change sizeof(type) into sizeof(var)

Anton Khirnov committed 13 years ago

Commit 7e2b15c1 parent bf5b5d21 file · +5 −2Browse files

Unified · Split

libavfilter/avfilter.c+5−2
@@ -87,8 +87,11 @@ int avfilter_link(AVFilterContext *src, unsigned srcpad, · 86 unmodified lines
87 return AVERROR(EINVAL);87 return AVERROR(EINVAL);
88 }88 }
89 89
90 src->outputs[srcpad] =90 link = av_mallocz(sizeof(*link));
91 dst-> inputs[dstpad] = link = av_mallocz(sizeof(AVFilterLink));91 if (!link)
92 return AVERROR(ENOMEM);
93
94 src->outputs[srcpad] = dst->inputs[dstpad] = link;
92 95
93 link->src = src;96 link->src = src;
94 link->dst = dst;97 link->dst = dst;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t