mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-02-23 13:21:43 +08:00
mmo tdata leak
malloc'd tdata isn't freed. * mmo.c (mmo_mkobject): Allocate tdata with bfd_zalloc.
This commit is contained in:
parent
c9ae58fe32
commit
f24bdec486
@ -1,3 +1,7 @@
|
||||
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
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user