]> git.sesse.net Git - ffmpeg/commitdiff
avfilter/copy: add forgotten check
authorPaul B Mahol <onemda@gmail.com>
Tue, 1 Oct 2019 12:55:43 +0000 (14:55 +0200)
committerPaul B Mahol <onemda@gmail.com>
Tue, 1 Oct 2019 12:55:43 +0000 (14:55 +0200)
libavfilter/af_acopy.c
libavfilter/vf_copy.c

index a7caec6ae9bc3da8f7cd5c8ac0f1d654c888b918..2d915019db1a2c95764af6acb14488b05efde7ad 100644 (file)
@@ -26,8 +26,10 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
     AVFrame *out = ff_get_audio_buffer(outlink, in->nb_samples);
     int ret;
 
-    if (!out)
+    if (!out) {
         ret = AVERROR(ENOMEM);
+        goto fail;
+    }
 
     ret = av_frame_copy_props(out, in);
     if (ret < 0)
index a59e024e87c69c8cbe6f34de6aa9cb8c63579c9a..e82feb4f0ecb51338302b2d75c05d3af08ab3107 100644 (file)
@@ -50,8 +50,10 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
     AVFrame *out = ff_get_video_buffer(outlink, in->width, in->height);
     int ret;
 
-    if (!out)
+    if (!out) {
         ret = AVERROR(ENOMEM);
+        goto fail;
+    }
 
     ret = av_frame_copy_props(out, in);
     if (ret < 0)