aboutsummaryrefslogtreecommitdiff
path: root/bfd/ihex.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/ihex.c')
-rw-r--r--bfd/ihex.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/bfd/ihex.c b/bfd/ihex.c
index ca36043..4055d47 100644
--- a/bfd/ihex.c
+++ b/bfd/ihex.c
@@ -381,8 +381,7 @@ ihex_scan (bfd *abfd)
/* An end record. */
if (abfd->start_address == 0)
abfd->start_address = addr;
- if (buf != NULL)
- free (buf);
+ free (buf);
return TRUE;
case 2:
@@ -474,14 +473,11 @@ ihex_scan (bfd *abfd)
if (error)
goto error_return;
- if (buf != NULL)
- free (buf);
-
+ free (buf);
return TRUE;
error_return:
- if (buf != NULL)
- free (buf);
+ free (buf);
return FALSE;
}
@@ -603,8 +599,7 @@ ihex_read_section (bfd *abfd, asection *section, bfd_byte *contents)
if ((bfd_size_type) (p - contents) >= section->size)
{
/* We've read everything in the section. */
- if (buf != NULL)
- free (buf);
+ free (buf);
return TRUE;
}
@@ -621,14 +616,11 @@ ihex_read_section (bfd *abfd, asection *section, bfd_byte *contents)
goto error_return;
}
- if (buf != NULL)
- free (buf);
-
+ free (buf);
return TRUE;
error_return:
- if (buf != NULL)
- free (buf);
+ free (buf);
return FALSE;
}