]> git.sesse.net Git - ffmpeg/commitdiff
avfilter/vf_zoompan: fix leaks
authorPaul B Mahol <onemda@gmail.com>
Wed, 25 Sep 2019 19:39:49 +0000 (21:39 +0200)
committerPaul B Mahol <onemda@gmail.com>
Wed, 25 Sep 2019 19:48:59 +0000 (21:48 +0200)
libavfilter/vf_zoompan.c

index 6b37890f1fd834d9c99877a646e4857c6b4a2ee5..59c9b19ec853491c811532b8d1c8f27d45a13deb 100644 (file)
@@ -245,6 +245,8 @@ static int output_single_frame(AVFilterContext *ctx, AVFrame *in, double *var_va
     }
     return ret;
 error:
+    sws_freeContext(s->sws);
+    s->sws = NULL;
     av_frame_free(&out);
     return ret;
 }
@@ -346,6 +348,10 @@ static av_cold void uninit(AVFilterContext *ctx)
 
     sws_freeContext(s->sws);
     s->sws = NULL;
+    av_expr_free(s->x_expr);
+    av_expr_free(s->y_expr);
+    av_expr_free(s->zoom_expr);
+    av_frame_free(&s->in);
 }
 
 static const AVFilterPad inputs[] = {