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

Zhao Zhili quinkblack at foxmail.com
Thu Oct 1 18:37:36 CEST 2020


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



More information about the vlc-devel mailing list