]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - bfd/coff-sh.c
Automatic date update in version.in
[thirdparty/binutils-gdb.git] / bfd / coff-sh.c
index 986cd4d1d04f33d0f61847e22689670f4a3dce3a..0c1061153a8fdde9261af03f406def24d0d0e50d 100644 (file)
@@ -1056,10 +1056,9 @@ sh_relax_section (bfd *abfd,
   return TRUE;
 
  error_return:
-  if (internal_relocs != NULL
-      && internal_relocs != coff_section_data (abfd, sec)->relocs)
+  if (internal_relocs != coff_section_data (abfd, sec)->relocs)
     free (internal_relocs);
-  if (contents != NULL && contents != coff_section_data (abfd, sec)->contents)
+  if (contents != coff_section_data (abfd, sec)->contents)
     free (contents);
   return FALSE;
 }
@@ -2723,8 +2722,7 @@ sh_align_loads (bfd *abfd,
   return TRUE;
 
  error_return:
-  if (labels != NULL)
-    free (labels);
+  free (labels);
   return FALSE;
 }
 \f
@@ -2995,12 +2993,9 @@ sh_coff_get_relocated_section_contents (bfd *output_bfd,
   return data;
 
  error_return:
-  if (internal_relocs != NULL)
-    free (internal_relocs);
-  if (internal_syms != NULL)
-    free (internal_syms);
-  if (sections != NULL)
-    free (sections);
+  free (internal_relocs);
+  free (internal_syms);
+  free (sections);
   return NULL;
 }
 
@@ -3044,7 +3039,7 @@ CREATE_LITTLE_COFF_TARGET_VEC (TARGET_SYM, TARGET_SHL_NAME, BFD_IS_RELAXABLE,
 /* Only recognize the small versions if the target was not defaulted.
    Otherwise we won't recognize the non default endianness.  */
 
-static const bfd_target *
+static bfd_cleanup
 coff_small_object_p (bfd *abfd)
 {
   if (abfd->target_defaulted)