gdb: add target_ops::supports_displaced_step
[deliverable/binutils-gdb.git] / bfd / ihex.c
index ca36043fe2daf48d8e7c68249f1df2311cdb9f37..4055d47e3d9efdcd1b0c594f91b7e0ced090277b 100644 (file)
@@ -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;
 }
 
This page took 0.035324 seconds and 4 git commands to generate.