Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 323794
b: refs/heads/master
c: 1fb8944
h: refs/heads/master
v: v3
  • Loading branch information
David Ahern authored and Arnaldo Carvalho de Melo committed Sep 8, 2012
1 parent 1e62f6a commit 39561f6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 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: bfd14b9a7231e7cf77520bca1848c40c6b6360ae
refs/heads/master: 1fb89448871500e5d5e7ad93d6dae68ee4fa464a
12 changes: 10 additions & 2 deletions trunk/tools/perf/util/probe-event.c
Original file line number Diff line number Diff line change
Expand Up @@ -2307,10 +2307,17 @@ static int convert_name_to_addr(struct perf_probe_event *pev, const char *exec)
function = NULL;
}
if (!pev->group) {
char *ptr1, *ptr2;
char *ptr1, *ptr2, *exec_copy;

pev->group = zalloc(sizeof(char *) * 64);
ptr1 = strdup(basename(exec));
exec_copy = strdup(exec);
if (!exec_copy) {
ret = -ENOMEM;
pr_warning("Failed to copy exec string.\n");
goto out;
}

ptr1 = strdup(basename(exec_copy));
if (ptr1) {
ptr2 = strpbrk(ptr1, "-._");
if (ptr2)
Expand All @@ -2319,6 +2326,7 @@ static int convert_name_to_addr(struct perf_probe_event *pev, const char *exec)
ptr1);
free(ptr1);
}
free(exec_copy);
}
free(pp->function);
pp->function = zalloc(sizeof(char *) * MAX_PROBE_ARGS);
Expand Down

0 comments on commit 39561f6

Please sign in to comment.