ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinha...@outlook.com> | 
Sat May  4 18:48:14 2024 +0200| [ba28222a14ab4c164a6702a65822871c68185c0d] | 
committer: Andreas Rheinhardt

avcodec/ratecontrol: Fix double free on error

Happens on init_pass2() failure.

Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ba28222a14ab4c164a6702a65822871c68185c0d
---

 libavcodec/ratecontrol.c | 1 +
 1 file changed, 1 insertion(+)

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);
 }
 

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to