projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f982df0
)
pivot-table: Fix memory leak in debug print code.
author
Ben Pfaff
<blp@cs.stanford.edu>
Fri, 25 Nov 2022 20:13:41 +0000
(12:13 -0800)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Fri, 25 Nov 2022 20:13:41 +0000
(12:13 -0800)
src/output/pivot-table.c
patch
|
blob
|
history
diff --git
a/src/output/pivot-table.c
b/src/output/pivot-table.c
index 93dc74c2d86e8299cbbe3e03e2d6de8a790ef799..1a200f75c08cadbe9a0620fa4a991ac1007ecf5c 100644
(file)
--- a/
src/output/pivot-table.c
+++ b/
src/output/pivot-table.c
@@
-1964,7
+1964,10
@@
compose_headings (const struct pivot_table *pt,
{
headings[row][column] = pivot_value_to_string (c->name, pt);
if (!*headings[row][column])
- headings[row][column] = xstrdup ("<blank>");
+ {
+ free (headings[row][column]);
+ headings[row][column] = xstrdup ("<blank>");
+ }
row--;
}
}