summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/dso.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/dso.c')
-rw-r--r--tools/perf/util/dso.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c
index 4ddeecb9ff85..4045d086d9d9 100644
--- a/tools/perf/util/dso.c
+++ b/tools/perf/util/dso.c
@@ -497,21 +497,18 @@ void dso__delete(struct dso *dso)
symbols__delete(&dso->symbols[i]);
if (dso->short_name_allocated) {
- free((char *)dso->short_name);
- dso->short_name = NULL;
+ zfree((char **)&dso->short_name);
dso->short_name_allocated = false;
}
if (dso->long_name_allocated) {
- free((char *)dso->long_name);
- dso->long_name = NULL;
+ zfree((char **)&dso->long_name);
dso->long_name_allocated = false;
}
dso_cache__free(&dso->cache);
dso__free_a2l(dso);
- free(dso->symsrc_filename);
- dso->symsrc_filename = NULL;
+ zfree(&dso->symsrc_filename);
free(dso);
}
OpenPOWER on IntegriCloud