mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-27 01:28:46 +00:00
memory leak in objdump disassemble_section
* objdump.c (disassemble_section): Free rel_ppstart on error path.
This commit is contained in:
@@ -3795,6 +3795,7 @@ disassemble_section (bfd *abfd, asection *section, void *inf)
|
||||
{
|
||||
non_fatal (_("Reading section %s failed because: %s"),
|
||||
section->name, bfd_errmsg (bfd_get_error ()));
|
||||
free (rel_ppstart);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -4075,9 +4076,7 @@ disassemble_section (bfd *abfd, asection *section, void *inf)
|
||||
}
|
||||
|
||||
free (data);
|
||||
|
||||
if (rel_ppstart != NULL)
|
||||
free (rel_ppstart);
|
||||
free (rel_ppstart);
|
||||
}
|
||||
|
||||
/* Disassemble the contents of an object file. */
|
||||
|
||||
Reference in New Issue
Block a user