projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
daf8302
)
output-item: Fix memory leak in output_item_dump().
author
Ben Pfaff
<blp@cs.stanford.edu>
Sat, 1 Jan 2022 21:31:39 +0000
(13:31 -0800)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Sun, 13 Mar 2022 23:56:02 +0000
(16:56 -0700)
src/output/output-item.c
patch
|
blob
|
history
diff --git
a/src/output/output-item.c
b/src/output/output-item.c
index 0c60b8dc269f39799e2aeeff41825084b318bc97..02aca446363f7d88395dfafa1aa161fad9606cbe 100644
(file)
--- a/
src/output/output-item.c
+++ b/
src/output/output-item.c
@@
-364,9
+364,12
@@
output_item_dump (const struct output_item *item, int indentation)
break;
case OUTPUT_ITEM_TEXT:
- printf ("text %s \"%s\"\n",
- text_item_subtype_to_string (item->text.subtype),
- pivot_value_to_string_defaults (item->text.content));
+ {
+ char *s = pivot_value_to_string_defaults (item->text.content);
+ printf ("text %s \"%s\"\n",
+ text_item_subtype_to_string (item->text.subtype), s);
+ free (s);
+ }
break;
}
}