projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
be42ce9
)
pspp-dump-sav: Fix memory leaks.
author
Ben Pfaff
<blp@cs.stanford.edu>
Sat, 23 Feb 2019 01:22:06 +0000
(17:22 -0800)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Sat, 23 Feb 2019 01:22:06 +0000
(17:22 -0800)
Found by Address Sanitizer.
utilities/pspp-dump-sav.c
patch
|
blob
|
history
diff --git
a/utilities/pspp-dump-sav.c
b/utilities/pspp-dump-sav.c
index 70687ebc803bb23a6f610b79f69a76476b0050fa..0aed9cf61488ae67e925891c7eb506037919dc1b 100644
(file)
--- a/
utilities/pspp-dump-sav.c
+++ b/
utilities/pspp-dump-sav.c
@@
-236,6
+236,8
@@
main (int argc, char *argv[])
else if (r.compression == COMP_ZLIB)
read_zlib_compressed_data (&r);
+ free (r.var_widths);
+
fclose (r.file);
}
@@
-1018,6
+1020,8
@@
read_character_encoding (struct sfm_reader *r, size_t size, size_t count)
read_string (r, encoding, count + 1);
printf ("%08llx: Character Encoding: %s\n", posn, encoding);
+
+ free (encoding);
}
static void