From b575cfb478df8b6b6bb81b149178fd66401788b1 Mon Sep 17 00:00:00 2001 From: John Vogel Date: Sat, 14 Dec 2024 03:19:13 -0500 Subject: [PATCH] xcalloc argument cleanup. --- export.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/export.c b/export.c index 24c6161..5ab1ad7 100644 --- a/export.c +++ b/export.c @@ -798,9 +798,9 @@ void export_commits(forest_t *forest, export_options_t *opts, export_stats.export_total_commits = export_ncommit(rl); /* the +1 is because mark indices are 1-origin, slot 0 always empty */ - markmap = (serial_t *)xcalloc(sizeof(serial_t), - forest->total_revisions + + markmap = (serial_t *)xcalloc(forest->total_revisions + export_stats.export_total_commits + 1, + sizeof(serial_t), "markmap allocation"); progress_begin("Generating snapshots...", forest->filecount); -- 2.47.1