[vlc-devel] [PATCH v2 1/4] config/chain: remove FREENULL usage

Alexandre Janniaux ajanni at videolabs.io
Mon Oct 5 09:13:12 CEST 2020


Hi,

Except the log patch, set LGTM. Do you want it to be merged
partially?

Regards,
--
Alexandre Janniaux
Videolabs

On Mon, Oct 05, 2020 at 12:03:32AM +0800, Zhao Zhili wrote:
> It's useless to set struct fields to NULL just before free the struct.
> ---
>  src/config/chain.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/config/chain.c b/src/config/chain.c
> index 608de1b3af..514a571ab7 100644
> --- a/src/config/chain.c
> +++ b/src/config/chain.c
> @@ -258,8 +258,8 @@ void config_ChainDestroy( config_chain_t *p_cfg )
>
>          p_next = p_cfg->p_next;
>
> -        FREENULL( p_cfg->psz_name );
> -        FREENULL( p_cfg->psz_value );
> +        free( p_cfg->psz_name );
> +        free( p_cfg->psz_value );
>          free( p_cfg );
>
>          p_cfg = p_next;
> --
> 2.25.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