Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1571532
| From | Taeung Song <treeze.taeung@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v3 3/4] perf tools: Use zfree() instead of free() and assigning NULL to the pointer |
| Date | 2017-02-01 13:40 +0100 |
| Message-ID | <t62mC-5Z6-9@gated-at.bofh.it> (permalink) |
| References | <t62mB-5Z6-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Signed-off-by: Taeung Song <treeze.taeung@gmail.com>
---
tools/perf/util/parse-events.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index 0c3b81a..316f054 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -254,8 +254,7 @@ struct tracepoint_path *tracepoint_name_to_path(const char *name)
if (path->system == NULL || path->name == NULL) {
zfree(&path->system);
zfree(&path->name);
- free(path);
- path = NULL;
+ zfree(&path);
}
return path;
@@ -1482,8 +1481,7 @@ static void perf_pmu__parse_cleanup(void)
p = perf_pmu_events_list + i;
free(p->symbol);
}
- free(perf_pmu_events_list);
- perf_pmu_events_list = NULL;
+ zfree(&perf_pmu_events_list);
perf_pmu_events_list_num = 0;
}
}
--
2.7.4
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH v3 3/4] perf tools: Use zfree() instead of free() and assigning NULL to the pointer Taeung Song <treeze.taeung@gmail.com> - 2017-02-01 13:40 +0100 [tip:perf/core] perf tools: Use zfree() instead of ad hoc equivalent tip-bot for Taeung Song <tipbot@zytor.com> - 2017-02-10 09:00 +0100
csiph-web