aboutsummaryrefslogtreecommitdiff
path: root/libctf/ChangeLog
diff options
context:
space:
mode:
authorNick Alcock <nick.alcock@oracle.com>2020-06-09 10:45:07 +0100
committerNick Alcock <nick.alcock@oracle.com>2020-07-22 18:02:17 +0100
commitb255b35feb80ecf096825395e01bccd34ee02b2b (patch)
tree851eeafd9c270c6f2435edf28e732893c606d0d6 /libctf/ChangeLog
parentc6e9a1e576ce4d948393b29e77b37e4ad934ee8f (diff)
downloadgdb-b255b35feb80ecf096825395e01bccd34ee02b2b.zip
gdb-b255b35feb80ecf096825395e01bccd34ee02b2b.tar.gz
gdb-b255b35feb80ecf096825395e01bccd34ee02b2b.tar.bz2
libctf, decl: avoid leaks of the formatted string on error
ctf_decl_sprintf builds up a formatted string in the ctf_decl_t's cd_buf, but then on error this is hardly ever freed: we assume that ctf_decl_fini frees it, but it leaks it instead. Make it free it like any decent ADT should. libctf/ * ctf-decl.c (ctf_decl_fini): Free the cd_buf. (ctf_decl_buf): Once it escapes, don't try to free it later.
Diffstat (limited to 'libctf/ChangeLog')
-rw-r--r--libctf/ChangeLog5
1 files changed, 5 insertions, 0 deletions
diff --git a/libctf/ChangeLog b/libctf/ChangeLog
index 288ad6e..d840bc4 100644
--- a/libctf/ChangeLog
+++ b/libctf/ChangeLog
@@ -1,5 +1,10 @@
2020-07-22 Nick Alcock <nick.alcock@oracle.com>
+ * ctf-decl.c (ctf_decl_fini): Free the cd_buf.
+ (ctf_decl_buf): Once it escapes, don't try to free it later.
+
+2020-07-22 Nick Alcock <nick.alcock@oracle.com>
+
* ctf-types.c (ctf_type_aname): Print arg types here...
* ctf-dump.c (ctf_dump_funcs): ... not here: but do substitute
in the type name here.