aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-05-04 18:48:14 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-06-12 10:36:01 +0200
commitba28222a14ab4c164a6702a65822871c68185c0d (patch)
tree6444b6b2ca9f34d100d0ba5bb531a4615afe58aa
parentbdd3c6ca5015e29d12fa3d317a6d8b6958156a93 (diff)
downloadffmpeg-ba28222a14ab4c164a6702a65822871c68185c0d.tar.gz
avcodec/ratecontrol: Fix double free on error
Happens on init_pass2() failure. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r--libavcodec/ratecontrol.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/ratecontrol.c b/libavcodec/ratecontrol.c
index 9ee08ecb88..27017d7976 100644
--- a/libavcodec/ratecontrol.c
+++ b/libavcodec/ratecontrol.c
@@ -694,6 +694,7 @@ av_cold void ff_rate_control_uninit(MpegEncContext *s)
emms_c();
av_expr_free(rcc->rc_eq_eval);
+ rcc->rc_eq_eval = NULL;
av_freep(&rcc->entry);
}