From: Ben Pfaff Date: Wed, 30 Dec 2020 20:28:56 +0000 (-0800) Subject: pivot-table: Fix incorrect allocation count in pivot_table_dump(). X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=760c7f33dc6eec2ed8050f02d131edf8330da908;p=pspp pivot-table: Fix incorrect allocation count in pivot_table_dump(). --- 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]];