From 760c7f33dc6eec2ed8050f02d131edf8330da908 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 30 Dec 2020 12:28:56 -0800 Subject: [PATCH] pivot-table: Fix incorrect allocation count in pivot_table_dump(). --- src/output/pivot-table.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/output/pivot-table.c b/src/output/pivot-table.c index a0c4836d41..d3f2c4d041 100644 --- a/src/output/pivot-table.c +++ b/src/output/pivot-table.c @@ -1678,8 +1678,7 @@ pivot_table_dump (const struct pivot_table *table, int indentation) pivot_value_dump (d->root->name); fputs (" =", stdout); - struct pivot_value **names = xnmalloc (layer_axis->label_depth, - sizeof *names); + struct pivot_value **names = xnmalloc (d->n_leaves, sizeof *names); size_t n_names = 0; for (const struct pivot_category *c = d->presentation_leaves[layer_indexes[i]]; -- 2.30.2