[vlc-devel] commit: free(NULL) is legal. ( Rémi Duraffort )

git version control git at videolan.org
Mon Jun 15 09:20:49 CEST 2009


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Sun Jun 14 12:46:54 2009 +0200| [8821427110a1d353ed27eaef577a2057923f46a1] | committer: Rémi Duraffort 

free(NULL) is legal.

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

 src/network/acl.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/src/network/acl.c b/src/network/acl.c
index c177781..89c3335 100644
--- a/src/network/acl.c
+++ b/src/network/acl.c
@@ -280,9 +280,7 @@ void ACL_Destroy( vlc_acl_t *p_acl )
 {
     if( p_acl != NULL )
     {
-        if( p_acl->p_entries != NULL )
-            free( p_acl->p_entries );
-
+        free( p_acl->p_entries );
         vlc_object_release( p_acl->p_owner );
         free( p_acl );
     }




More information about the vlc-devel mailing list