diff options
Diffstat (limited to 'bfd/elfnn-riscv.c')
-rw-r--r-- | bfd/elfnn-riscv.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/bfd/elfnn-riscv.c b/bfd/elfnn-riscv.c index e8e377e..5fa6e35 100644 --- a/bfd/elfnn-riscv.c +++ b/bfd/elfnn-riscv.c @@ -2393,9 +2393,8 @@ riscv_elf_relocate_section (bfd *output_bfd, if (msg && r != bfd_reloc_dangerous) info->callbacks->einfo (msg); - /* Free the unused `msg_buf` if needed. */ - if (msg_buf) - free (msg_buf); + /* Free the unused `msg_buf`. */ + free (msg_buf); /* We already reported the error via a callback, so don't try to report it again by returning false. That leads to spurious errors. */ |