Lionel Debroux : server: Remove redundant NULL checks before free ( found by Smatch).

Alexandre Julliard julliard at winehq.org
Mon Oct 22 09:55:19 CDT 2007


Module: wine
Branch: master
Commit: e122f81337d6544fd512f5664b34fc6ad0ab94c0
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=e122f81337d6544fd512f5664b34fc6ad0ab94c0

Author: Lionel Debroux <lionel_debroux at yahoo.fr>
Date:   Sat Oct 20 09:37:43 2007 +0200

server: Remove redundant NULL checks before free (found by Smatch).

---

 server/registry.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/server/registry.c b/server/registry.c
index ac740ef..03828e1 100644
--- a/server/registry.c
+++ b/server/registry.c
@@ -334,8 +334,8 @@ static void key_destroy( struct object *obj )
     free( key->class );
     for (i = 0; i <= key->last_value; i++)
     {
-        if (key->values[i].name) free( key->values[i].name );
-        if (key->values[i].data) free( key->values[i].data );
+        free( key->values[i].name );
+        free( key->values[i].data );
     }
     free( key->values );
     for (i = 0; i <= key->last_subkey; i++)




More information about the wine-cvs mailing list