summaryrefslogtreecommitdiff
path: root/perf
diff options
context:
space:
mode:
Diffstat (limited to 'perf')
-rw-r--r--perf/cairo-perf-diff-files.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/perf/cairo-perf-diff-files.c b/perf/cairo-perf-diff-files.c
index b4d9dc2a5..520ba3578 100644
--- a/perf/cairo-perf-diff-files.c
+++ b/perf/cairo-perf-diff-files.c
@@ -359,7 +359,8 @@ cairo_perf_report_sort_and_compute_stats (cairo_perf_report_t *report)
new_samples_count += t->samples_count;
if (new_samples_count > base->samples_size) {
base->samples_size = new_samples_count;
- base->samples = xrealloc (base->samples, base->samples_size);
+ base->samples = xrealloc (base->samples,
+ base->samples_size * sizeof (cairo_perf_ticks_t));
}
for (t = base + 1; t < next; t++) {
memcpy (&base->samples[base->samples_count], t->samples,