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

Zhao Zhili quinkblack at foxmail.com
Mon Oct 5 11:10:55 CEST 2020


On 10/5/20 3:13 PM, Alexandre Janniaux wrote:
> Hi,
>
> Except the log patch, set LGTM. Do you want it to be merged
> partially?

Yes please. And please help improve the commit message

of 4/4 if the expression is not clear.

>
> 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
> _______________________________________________
> 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