History

avfilter/copy: add forgotten check

Paul B Mahol committed 7 years ago

Commit 94b155e1 parent 9cee8972 files · +6 −2Browse files

Unified · Split

2 files
  1. libavfilter/af_acopy.c +3 −1
  2. libavfilter/vf_copy.c +3 −1
libavfilter/af_acopy.c+3−1
@@ -26,8 +26,10 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) · 25 unmodified lines
2626 AVFrame *out = ff_get_audio_buffer(outlink, in->nb_samples);
2727 int ret;
2828
29− if (!out)
29+ if (!out) {
3030 ret = AVERROR(ENOMEM);
31+ goto fail;
32+ }
3133
3234 ret = av_frame_copy_props(out, in);
3335 if (ret < 0)
libavfilter/vf_copy.c+3−1
@@ -50,8 +50,10 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) · 49 unmodified lines
5050 AVFrame *out = ff_get_video_buffer(outlink, in->width, in->height);
5151 int ret;
5252
53− if (!out)
53+ if (!out) {
5454 ret = AVERROR(ENOMEM);
55+ goto fail;
56+ }
5557
5658 ret = av_frame_copy_props(out, in);
5759 if (ret < 0)

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