summaryrefslogtreecommitdiff
path: root/perf
diff options
context:
space:
mode:
Diffstat (limited to 'perf')
-rw-r--r--perf/cairo-perf-report.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/perf/cairo-perf-report.c b/perf/cairo-perf-report.c
index 8df78c647..38bdc0cd4 100644
--- a/perf/cairo-perf-report.c
+++ b/perf/cairo-perf-report.c
@@ -388,11 +388,9 @@ cairo_perf_report_load (cairo_perf_report_t *report,
if (name == NULL)
name = "stdin";
- configuration = xmalloc (strlen (name) * sizeof (char) + 1);
- strcpy (configuration, name);
+ configuration = xstrdup (name);
baseName = basename (configuration);
- report->configuration = xmalloc (strlen (baseName) * sizeof (char) + 1);
- strcpy (report->configuration, baseName);
+ report->configuration = xstrdup (baseName);
free (configuration);
dot = strrchr (report->configuration, '.');