projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
pivot-table: Fix use-after-free error.
[pspp]
/
src
/
output
/
pivot-table.c
diff --git
a/src/output/pivot-table.c
b/src/output/pivot-table.c
index 41337cde73eccecfef006de01a2a92f3bedf53b0..2adcf62634d32a3385a513cd85e344b9870a0d77 100644
(file)
--- a/
src/output/pivot-table.c
+++ b/
src/output/pivot-table.c
@@
-1791,8
+1791,8
@@
pivot_value_destroy (struct pivot_value *value)
font_style_uninit (value->font_style);
free (value->font_style);
free (value->cell_style);
font_style_uninit (value->font_style);
free (value->font_style);
free (value->cell_style);
- for (size_t i = 0; i < value->n_footnotes; i++)
- pivot_footnote_destroy (value->footnotes[i]);
+ /* Do not free the elements of footnotes because VALUE does not own
+ them. */
free (value->footnotes);
switch (value->type)
free (value->footnotes);
switch (value->type)