aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/avfiltergraph.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-08-07 04:28:07 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-08-12 21:27:52 +0200
commitc4c10feaa8c3604abfec4283715b37358f73b6e7 (patch)
treedf52ba499c1f91d63991e749bc7ed74c35b21779 /libavfilter/avfiltergraph.c
parent9d1bf9cffefa2eb57221eb33d5a261750c4bee85 (diff)
downloadffmpeg-c4c10feaa8c3604abfec4283715b37358f73b6e7.tar.gz
Revert "lavfi/avfiltergraph: add check before free the format"
This reverts commit f156f4ab2317f22bfef33c7eaead0d5d5f162903. The checks added by said commit are nonsense because they did not help in case ff_merge_samplerates() or ff_merge_formats() returned NULL while freeing one of its arguments: Said freeing does not change the local variables of can_merge_formats(). Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavfilter/avfiltergraph.c')
-rw-r--r--libavfilter/avfiltergraph.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c
index 2fe4f0b0f9..a149f8fb6d 100644
--- a/libavfilter/avfiltergraph.c
+++ b/libavfilter/avfiltergraph.c
@@ -419,10 +419,8 @@ static int can_merge_formats(AVFilterFormats *a_arg,
av_freep(&ret);
return 1;
} else {
- if (a)
- av_freep(&a->formats);
- if (b)
- av_freep(&b->formats);
+ av_freep(&a->formats);
+ av_freep(&b->formats);
av_freep(&a);
av_freep(&b);
return 0;