[vlc-devel] [PATCH] adjust: fix double free on unsupported chroma
Steve Lhomme
robux4 at ycbcr.xyz
Thu Mar 5 09:58:15 CET 2020
Looks OK.
In general it may be better to automatically free the module resources
if it fails to load. It might be done in some case but not all. If you
have a double free then the resource was already released elsewhere
automatically so you don't have to do it here at all.
On 2020-03-04 22:02, Tristan Matthews wrote:
> Regression since:
>
> commit 4316cfda13ff87f5d579f5562def1bc4e24f9731
> Author: RĂ©mi Denis-Courmont <remi at remlab.net>
> Date: Wed Feb 26 20:44:13 2020 +0200
>
> adjust: use vlc_obj_malloc()
> ---
> modules/video_filter/adjust.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/modules/video_filter/adjust.c b/modules/video_filter/adjust.c
> index c48d9b5ec3..35b061b855 100644
> --- a/modules/video_filter/adjust.c
> +++ b/modules/video_filter/adjust.c
> @@ -189,7 +189,7 @@ static int Create( vlc_object_t *p_this )
> default:
> msg_Dbg( p_filter, "Unsupported input chroma (%4.4s)",
> (char*)&(p_filter->fmt_in.video.i_chroma) );
> - free(p_sys);
> + vlc_obj_free( p_this, p_sys );
> return VLC_EGENERIC;
> }
>
> --
> 2.20.1
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
>
More information about the vlc-devel
mailing list