coccinelle: polish FREE_AND_NULL rules
[gitweb.git] / help.c
diff --git a/help.c b/help.c
index db7f3d79a016881639a8c0640451afe35b011e5e..a2f48c0df3f5456a880533f55b5168c454ea5b20 100644 (file)
--- a/help.c
+++ b/help.c
@@ -267,9 +267,8 @@ static void add_cmd_list(struct cmdnames *cmds, struct cmdnames *old)
 
        for (i = 0; i < old->cnt; i++)
                cmds->names[cmds->cnt++] = old->names[i];
-       free(old->names);
+       FREE_AND_NULL(old->names);
        old->cnt = 0;
-       old->names = NULL;
 }
 
 /* An empirically derived magic number */