[FFmpeg-devel] [PATCH v2 01/71] avcodec/ratecontrol: Fix double free on error

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Tue Jun 11 23:59:03 EEST 2024


Andreas Rheinhardt:
> Happens on init_pass2() failure.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> ---
>  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);
>  }
>  

Will apply this patchset tomorrow unless there are objections.

- Andreas



More information about the ffmpeg-devel mailing list