Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 209253
b: refs/heads/master
c: 449e5b2
h: refs/heads/master
i:
  209251: b91ab6e
v: v3
  • Loading branch information
Masami Hiramatsu authored and Arnaldo Carvalho de Melo committed Aug 6, 2010
1 parent 11ff839 commit e93ebe9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 58432e1f3625ef22b347ec8f9487e1852aa9ad67
refs/heads/master: 449e5b247ca7c9dc9fc3391b7eebfefdeb2ce1fc
11 changes: 8 additions & 3 deletions trunk/tools/perf/util/probe-event.c
Original file line number Diff line number Diff line change
Expand Up @@ -1606,8 +1606,10 @@ int add_perf_probe_events(struct perf_probe_event *pevs, int npevs,

/* Init vmlinux path */
ret = init_vmlinux();
if (ret < 0)
if (ret < 0) {
free(pkgs);
return ret;
}

/* Loop 1: convert all events */
for (i = 0; i < npevs; i++) {
Expand All @@ -1625,10 +1627,13 @@ int add_perf_probe_events(struct perf_probe_event *pevs, int npevs,
ret = __add_probe_trace_events(pkgs[i].pev, pkgs[i].tevs,
pkgs[i].ntevs, force_add);
end:
/* Loop 3: cleanup trace events */
for (i = 0; i < npevs; i++)
/* Loop 3: cleanup and free trace events */
for (i = 0; i < npevs; i++) {
for (j = 0; j < pkgs[i].ntevs; j++)
clear_probe_trace_event(&pkgs[i].tevs[j]);
free(pkgs[i].tevs);
}
free(pkgs);

return ret;
}
Expand Down

0 comments on commit e93ebe9

Please sign in to comment.