]> Git Repo - linux.git/blobdiff - tools/perf/util/srcline.c
perf tools: Use zfree to help detect use after free bugs
[linux.git] / tools / perf / util / srcline.c
index 58b2bd8f38c9ede39a87daf2e59b551bcc1225d5..7e67879ebd2548cd1bf0d92511b10f776e128a4b 100644 (file)
@@ -129,7 +129,7 @@ static struct a2l_data *addr2line_init(const char *path)
 
 out:
        if (a2l) {
-               free((void *)a2l->input);
+               zfree((void **)&a2l->input);
                free(a2l);
        }
        bfd_close(abfd);
@@ -140,8 +140,8 @@ static void addr2line_cleanup(struct a2l_data *a2l)
 {
        if (a2l->abfd)
                bfd_close(a2l->abfd);
-       free((void *)a2l->input);
-       free(a2l->syms);
+       zfree((void **)&a2l->input);
+       zfree(&a2l->syms);
        free(a2l);
 }
 
This page took 0.032403 seconds and 4 git commands to generate.