X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavfilter%2Favfiltergraph.c;h=2fe4f0b0f9b7ea6b2181a8356e4bcb15d0fe4c8a;hb=3ad5d4df9ce794d3eeb0f526c5f3e446bf97c616;hp=a149f8fb6d631adcee9f80217c6faad0f9df0193;hpb=1f1ec958f6c68a5ceafea206a99c895f62d0f3ec;p=ffmpeg diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c index a149f8fb6d6..2fe4f0b0f9b 100644 --- a/libavfilter/avfiltergraph.c +++ b/libavfilter/avfiltergraph.c @@ -419,8 +419,10 @@ static int can_merge_formats(AVFilterFormats *a_arg, av_freep(&ret); return 1; } else { - av_freep(&a->formats); - av_freep(&b->formats); + if (a) + av_freep(&a->formats); + if (b) + av_freep(&b->formats); av_freep(&a); av_freep(&b); return 0;