Replace "if (x) free (x)" with "free (x)", bfd
[deliverable/binutils-gdb.git] / bfd / opncls.c
index 78b2ad7dd759abc72776fa3375c0d8e9462a4925..794cf99e7cefac87f9d04e93ef7ef443741da457 100644 (file)
@@ -1162,8 +1162,7 @@ bfd_get_debug_link_info_1 (bfd *abfd, void *crc32_out)
 
   if (!bfd_malloc_and_get_section (abfd, sect, &contents))
     {
-      if (contents != NULL)
-       free (contents);
+      free (contents);
       return NULL;
     }
 
@@ -1252,8 +1251,7 @@ bfd_get_alt_debug_link_info (bfd * abfd, bfd_size_type *buildid_len,
 
   if (!bfd_malloc_and_get_section (abfd, sect, & contents))
     {
-      if (contents != NULL)
-       free (contents);
+      free (contents);
       return NULL;
     }
 
@@ -1821,8 +1819,7 @@ get_build_id (bfd *abfd)
 
   if (!bfd_malloc_and_get_section (abfd, sect, & contents))
     {
-      if (contents != NULL)
-       free (contents);
+      free (contents);
       return NULL;
     }
 
This page took 0.025585 seconds and 4 git commands to generate.