aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2019-12-09 20:34:49 +1030
committerAlan Modra <amodra@gmail.com>2019-12-10 09:07:29 +1030
commit20135676fc4c3912297c313b3e0d3cbd6cc402e3 (patch)
tree5073836e171a6fa7adbe05c60c23580e14defe79 /include
parent103ebbc35cc1975442e1e6233207d8d7b2016556 (diff)
downloadgdb-20135676fc4c3912297c313b3e0d3cbd6cc402e3.zip
gdb-20135676fc4c3912297c313b3e0d3cbd6cc402e3.tar.gz
gdb-20135676fc4c3912297c313b3e0d3cbd6cc402e3.tar.bz2
PR24960, Memory leak from disassembler
PR 24960 include/ * dis-asm.h (disassemble_free_target): Declare. opcodes/ * disassemble.c (disassemble_free_target): New function. binutils/ * objdump.c (disassemble_data): Call disassemble_free_target.
Diffstat (limited to 'include')
-rw-r--r--include/ChangeLog5
-rw-r--r--include/dis-asm.h5
2 files changed, 9 insertions, 1 deletions
diff --git a/include/ChangeLog b/include/ChangeLog
index 7c4fcb8..681cbfa 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,5 +1,10 @@
2019-12-10 Alan Modra <amodra@gmail.com>
+ PR 24960
+ * dis-asm.h (disassemble_free_target): Declare.
+
+2019-12-10 Alan Modra <amodra@gmail.com>
+
* dis-asm.h (struct disassemble_info): Delete insn_sets.
(INIT_DISASSEMBLE_INFO_NO_ARCH): Don't define.
diff --git a/include/dis-asm.h b/include/dis-asm.h
index c1746502..82bf4dc 100644
--- a/include/dis-asm.h
+++ b/include/dis-asm.h
@@ -325,7 +325,10 @@ extern disassembler_ftype disassembler (enum bfd_architecture arc,
/* Amend the disassemble_info structure as necessary for the target architecture.
Should only be called after initialising the info->arch field. */
-extern void disassemble_init_for_target (struct disassemble_info * dinfo);
+extern void disassemble_init_for_target (struct disassemble_info *);
+
+/* Tidy any memory allocated by targets, such as info->private_data. */
+extern void disassemble_free_target (struct disassemble_info *);
/* Document any target specific options available from the disassembler. */
extern void disassembler_usage (FILE *);