]> Pileus Git - ~andy/linux/blobdiff - tools/perf/util/symbol.c
perf tools: Introduce zfree
[~andy/linux] / tools / perf / util / symbol.c
index 923d00040bbfd21eee501ac000a669b08da6a484..fd9e1a4fad1669038fe0568c38b417b459afc71f 100644 (file)
@@ -1621,13 +1621,10 @@ static int dso__load_guest_kernel_sym(struct dso *dso, struct map *map,
 
 static void vmlinux_path__exit(void)
 {
-       while (--vmlinux_path__nr_entries >= 0) {
-               free(vmlinux_path[vmlinux_path__nr_entries]);
-               vmlinux_path[vmlinux_path__nr_entries] = NULL;
-       }
+       while (--vmlinux_path__nr_entries >= 0)
+               zfree(&vmlinux_path[vmlinux_path__nr_entries]);
 
-       free(vmlinux_path);
-       vmlinux_path = NULL;
+       zfree(&vmlinux_path);
 }
 
 static int vmlinux_path__init(void)