]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - bfd/simple.c
Replace "if (x) free (x)" with "free (x)", bfd
[thirdparty/binutils-gdb.git] / bfd / simple.c
index 1e320fc391754b758010dc4919fdd6e0cdb20d83..bbdef23a140d623631614ded8eb88723c28fae3c 100644 (file)
@@ -242,8 +242,7 @@ bfd_simple_get_relocated_section_contents (bfd *abfd,
                                   * saved_offsets.section_count);
   if (saved_offsets.sections == NULL)
     {
-      if (data)
-       free (data);
+      free (data);
       _bfd_generic_link_hash_table_free (abfd);
       abfd->link.next = link_next;
       return NULL;
@@ -267,7 +266,7 @@ bfd_simple_get_relocated_section_contents (bfd *abfd,
                                                 outbuf,
                                                 0,
                                                 symbol_table);
-  if (contents == NULL && data != NULL)
+  if (contents == NULL)
     free (data);
 
   bfd_map_over_sections (abfd, simple_restore_output_info, &saved_offsets);