diff options
Diffstat (limited to 'tools/perf/util/event.c')
-rw-r--r-- | tools/perf/util/event.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c index 8151d23664c7..6b0db5577929 100644 --- a/tools/perf/util/event.c +++ b/tools/perf/util/event.c | |||
@@ -515,12 +515,13 @@ int event__process_mmap(event_t *self, struct perf_session *session) | |||
515 | if (machine == NULL) | 515 | if (machine == NULL) |
516 | goto out_problem; | 516 | goto out_problem; |
517 | thread = perf_session__findnew(session, self->mmap.pid); | 517 | thread = perf_session__findnew(session, self->mmap.pid); |
518 | if (thread == NULL) | ||
519 | goto out_problem; | ||
518 | map = map__new(&machine->user_dsos, self->mmap.start, | 520 | map = map__new(&machine->user_dsos, self->mmap.start, |
519 | self->mmap.len, self->mmap.pgoff, | 521 | self->mmap.len, self->mmap.pgoff, |
520 | self->mmap.pid, self->mmap.filename, | 522 | self->mmap.pid, self->mmap.filename, |
521 | MAP__FUNCTION); | 523 | MAP__FUNCTION); |
522 | 524 | if (map == NULL) | |
523 | if (thread == NULL || map == NULL) | ||
524 | goto out_problem; | 525 | goto out_problem; |
525 | 526 | ||
526 | thread__insert_map(thread, map); | 527 | thread__insert_map(thread, map); |