]> Pileus Git - ~andy/linux/blobdiff - tools/perf/util/help.c
perf tools: Introduce zfree
[~andy/linux] / tools / perf / util / help.c
index 8b1f6e891b8a8f3857bbf98e97b7f1f9c84f9987..7b68978e50d24d98c7da185c606ca8e8b9be8a3a 100644 (file)
@@ -263,9 +263,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);
+       zfree(&old->names);
        old->cnt = 0;
-       old->names = NULL;
 }
 
 const char *help_unknown_cmd(const char *cmd)