]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/graphparser.c
avfilter/graphparser: zero filter_ctx in case of deallocation in create_filter()
[ffmpeg] / libavfilter / graphparser.c
index 93033dc8eb6d0026fcb5decf6b19b370840cf4af..7e25282d0de874d9365667f993e14fbe3fad3c07 100644 (file)
@@ -132,6 +132,8 @@ static int create_filter(AVFilterContext **filt_ctx, AVFilterGraph *ctx, int ind
         if (args)
             av_log(log_ctx, AV_LOG_ERROR, " with args '%s'", args);
         av_log(log_ctx, AV_LOG_ERROR, "\n");
+        avfilter_free(*filt_ctx);
+        *filt_ctx = NULL;
     }
 
     av_free(tmp_args);