]> Git Repo - linux.git/blobdiff - tools/perf/util/symbol-elf.c
perf tools: Use zfree to help detect use after free bugs
[linux.git] / tools / perf / util / symbol-elf.c
index eed0b96302af189fa4b7c75f73ef538b8493336e..4b0a127a4d3b43c7a8230dffe04b1cefb720a301 100644 (file)
@@ -6,6 +6,7 @@
 #include <inttypes.h>
 
 #include "symbol.h"
+#include <symbol/kallsyms.h>
 #include "debug.h"
 
 #ifndef HAVE_ELF_GETPHDRNUM_SUPPORT
@@ -553,7 +554,7 @@ bool symsrc__has_symtab(struct symsrc *ss)
 
 void symsrc__destroy(struct symsrc *ss)
 {
-       free(ss->name);
+       zfree(&ss->name);
        elf_end(ss->elf);
        close(ss->fd);
 }
This page took 0.031216 seconds and 4 git commands to generate.