summaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-probe.c
diff options
context:
space:
mode:
authorMasami Hiramatsu <mhiramat@redhat.com>2010-03-16 18:05:30 -0400
committerIngo Molnar <mingo@elte.hu>2010-03-17 11:32:29 +0100
commit31facc5f1ac674fbcc29f212377e589396bb934c (patch)
treeb89ad49ac394299501d247efe82c3a409f74a110 /tools/perf/builtin-probe.c
parenta1d37d5285bcda07f9c0b80a2634ca20ab545297 (diff)
downloadlinux-31facc5f1ac674fbcc29f212377e589396bb934c.tar.gz
linux-31facc5f1ac674fbcc29f212377e589396bb934c.tar.bz2
linux-31facc5f1ac674fbcc29f212377e589396bb934c.zip
perf probe: Use wrapper functions
Use wrapped functions as much as possible, to check out of memory conditions in perf probe. Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com> Cc: systemtap <systemtap@sources.redhat.com> Cc: DLE <dle-develop@lists.sourceforge.net> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <20100316220530.32050.53951.stgit@localhost6.localdomain6> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/builtin-probe.c')
-rw-r--r--tools/perf/builtin-probe.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c
index 152d6c9b1fa4..b6afe7b344dd 100644
--- a/tools/perf/builtin-probe.c
+++ b/tools/perf/builtin-probe.c
@@ -87,9 +87,7 @@ static void parse_probe_event_argv(int argc, const char **argv)
len = 0;
for (i = 0; i < argc; i++)
len += strlen(argv[i]) + 1;
- buf = zalloc(len + 1);
- if (!buf)
- die("Failed to allocate memory for binding arguments.");
+ buf = xzalloc(len + 1);
len = 0;
for (i = 0; i < argc; i++)
len += sprintf(&buf[len], "%s ", argv[i]);