aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-probe.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/builtin-probe.c')
-rw-r--r--tools/perf/builtin-probe.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c
index d78a3d945492..a2f6daf01ecb 100644
--- a/tools/perf/builtin-probe.c
+++ b/tools/perf/builtin-probe.c
@@ -309,9 +309,9 @@ static int synthesize_probe_event(struct probe_point *pp)
309{ 309{
310 char *buf; 310 char *buf;
311 int i, len, ret; 311 int i, len, ret;
312 pp->probes[0] = buf = (char *)calloc(MAX_CMDLEN, sizeof(char)); 312 pp->probes[0] = buf = zalloc(MAX_CMDLEN);
313 if (!buf) 313 if (!buf)
314 die("Failed to allocate memory by calloc."); 314 die("Failed to allocate memory by zalloc.");
315 ret = snprintf(buf, MAX_CMDLEN, "%s+%d", pp->function, pp->offset); 315 ret = snprintf(buf, MAX_CMDLEN, "%s+%d", pp->function, pp->offset);
316 if (ret <= 0 || ret >= MAX_CMDLEN) 316 if (ret <= 0 || ret >= MAX_CMDLEN)
317 goto error; 317 goto error;