The "of course to free outsymbols" turned out to be wrong. outsymbols
belongs to objcopy which frees them, so commit
6ca01b0bdd59 introduced
a double free.
* srec.c (srec_write_symbols): Don't free outsymbols.
* tekhex.c (tekhex_write_object_contents): Likewise.
goto fail;
}
- free (abfd->outsymbols);
- abfd->outsymbols = NULL;
return true;
fail:
- free (abfd->outsymbols);
- abfd->outsymbols = NULL;
return false;
}
/* And the terminator. */
if (bfd_write ("%0781010\n", 9, abfd) != 9)
goto fail;
- free (abfd->outsymbols);
- abfd->outsymbols = NULL;
return true;
fail:
- free (abfd->outsymbols);
- abfd->outsymbols = NULL;
return false;
}