libavfilter/graphparser.c:474: error: Use After Free
  call to `avfilter_free()` eventually accesses memory that was invalidated by call to `free()` on line 474 indirectly during the call to `avfilter_free()`.

libavfilter/graphparser.c:418:1: invalidation part of the trace starts here
416. }
417. 
418. int avfilter_graph_parse2(AVFilterGraph *graph, const char *filters,
     ^
419.                           AVFilterInOut **inputs,
420.                           AVFilterInOut **outputs)

libavfilter/graphparser.c:418:1: parameter `graph` of avfilter_graph_parse2
  416. }
  417. 
  418. int avfilter_graph_parse2(AVFilterGraph *graph, const char *filters,
       ^
  419.                           AVFilterInOut **inputs,
  420.                           AVFilterInOut **outputs)

libavfilter/graphparser.c:474:9: when calling `avfilter_free` here
  472.  fail:
  473.     while (graph->nb_filters)
  474.         avfilter_free(graph->filters[0]);
               ^
  475.     av_freep(&graph->filters);
  476.     avfilter_inout_free(&open_inputs);

libavfilter/avfilter.c:508:1: parameter `filter` of avfilter_free
    506. }
    507. 
    508. void avfilter_free(AVFilterContext *filter)
         ^
    509. {
    510.     int i;

libavfilter/avfilter.c:537:5: when calling `av_free` here
    535.     av_freep(&filter->priv);
    536.     av_freep(&filter->internal);
    537.     av_free(filter);
             ^
    538. }
    539. 

libavutil/mem.c:170:1: parameter `ptr` of av_free
      168. }
      169. 
      170. void av_free(void *ptr)
           ^
      171. {
      172. #if HAVE_ALIGNED_MALLOC

libavutil/mem.c:175:5: was invalidated by call to `free()`
      173.     _aligned_free(ptr);
      174. #else
      175.     free(ptr);
               ^
      176. #endif
      177. }

libavfilter/graphparser.c:418:1: use-after-lifetime part of the trace starts here
416. }
417. 
418. int avfilter_graph_parse2(AVFilterGraph *graph, const char *filters,
     ^
419.                           AVFilterInOut **inputs,
420.                           AVFilterInOut **outputs)

libavfilter/graphparser.c:418:1: parameter `graph` of avfilter_graph_parse2
  416. }
  417. 
  418. int avfilter_graph_parse2(AVFilterGraph *graph, const char *filters,
       ^
  419.                           AVFilterInOut **inputs,
  420.                           AVFilterInOut **outputs)

libavfilter/graphparser.c:474:9: when calling `avfilter_free` here
  472.  fail:
  473.     while (graph->nb_filters)
  474.         avfilter_free(graph->filters[0]);
               ^
  475.     av_freep(&graph->filters);
  476.     avfilter_inout_free(&open_inputs);

libavfilter/avfilter.c:508:1: parameter `filter` of avfilter_free
    506. }
    507. 
    508. void avfilter_free(AVFilterContext *filter)
         ^
    509. {
    510.     int i;

libavfilter/avfilter.c:537:5: when calling `av_free` here
    535.     av_freep(&filter->priv);
    536.     av_freep(&filter->internal);
    537.     av_free(filter);
             ^
    538. }
    539. 

libavutil/mem.c:170:1: parameter `ptr` of av_free
      168. }
      169. 
      170. void av_free(void *ptr)
           ^
      171. {
      172. #if HAVE_ALIGNED_MALLOC

libavutil/mem.c:175:5: invalid access occurs here
      173.     _aligned_free(ptr);
      174. #else
      175.     free(ptr);
               ^
      176. #endif
      177. }
