diff options
-rw-r--r-- | tools/perf/util/parse-events.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index 2720600..1f1f77d 100644 --- a/tools/perf/util/parse-events.c +++ b/tools/perf/util/parse-events.c @@ -211,6 +211,8 @@ struct tracepoint_path *tracepoint_id_to_path(u64 config) closedir(evt_dir); closedir(sys_dir); path = zalloc(sizeof(*path)); + if (!path) + return NULL; path->system = malloc(MAX_EVENT_LENGTH); if (!path->system) { free(path); |