[vlc-commits] config/chain: remove FREENULL usage

Zhao Zhili git at videolan.org
Fri Oct 16 09:43:24 CEST 2020


vlc | branch: master | Zhao Zhili <quinkblack at foxmail.com> | Sun Oct  4 18:03:00 2020 +0200| [b1c81a0a86fc4c542493be915bd3297b21e413e2] | committer: Steve Lhomme

config/chain: remove FREENULL usage

It's useless to set struct fields to NULL just before free the struct.

Signed-off-by: Steve Lhomme <robux4 at ycbcr.xyz>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b1c81a0a86fc4c542493be915bd3297b21e413e2
---

 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..feadacb730 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;



More information about the vlc-commits mailing list