aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/util/probe-event.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index cd7fbda5e2a5..de0d91385c91 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -413,12 +413,13 @@ static struct strlist *get_perf_event_names(int fd)
413 413
414 rawlist = get_trace_kprobe_event_rawlist(fd); 414 rawlist = get_trace_kprobe_event_rawlist(fd);
415 415
416 sl = strlist__new(false, NULL); 416 sl = strlist__new(true, NULL);
417 for (i = 0; i < strlist__nr_entries(rawlist); i++) { 417 for (i = 0; i < strlist__nr_entries(rawlist); i++) {
418 ent = strlist__entry(rawlist, i); 418 ent = strlist__entry(rawlist, i);
419 parse_trace_kprobe_event(ent->s, &group, &event, NULL); 419 parse_trace_kprobe_event(ent->s, &group, &event, NULL);
420 strlist__add(sl, event); 420 strlist__add(sl, event);
421 free(group); 421 free(group);
422 free(event);
422 } 423 }
423 424
424 strlist__delete(rawlist); 425 strlist__delete(rawlist);
@@ -480,5 +481,6 @@ void add_trace_kprobe_events(struct probe_point *probes, int nr_probes)
480 strlist__add(namelist, event); 481 strlist__add(namelist, event);
481 } 482 }
482 } 483 }
484 strlist__delete(namelist);
483 close(fd); 485 close(fd);
484} 486}