aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bfd/ChangeLog4
-rw-r--r--bfd/mmo.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 6d19839..8291a98 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,9 @@
2020-01-04 Alan Modra <amodra@gmail.com>
+ * mmo.c (mmo_mkobject): Allocate tdata with bfd_zalloc.
+
+2020-01-04 Alan Modra <amodra@gmail.com>
+
* coffgen.c (coff_real_object_p): Free malloc'd memory on target
match too.
diff --git a/bfd/mmo.c b/bfd/mmo.c
index ca116aa..9ac689d 100644
--- a/bfd/mmo.c
+++ b/bfd/mmo.c
@@ -579,7 +579,7 @@ mmo_mkobject (bfd *abfd)
/* All fields are zero-initialized, so we don't have to explicitly
initialize most. */
- tdata_type *tdata = (tdata_type *) bfd_zmalloc (sizeof (tdata_type));
+ tdata_type *tdata = (tdata_type *) bfd_zalloc (abfd, sizeof (tdata_type));
if (tdata == NULL)
return FALSE;