frv: Don't generate dynamic relocation for non SEC_ALLOC sections
[deliverable/binutils-gdb.git] / bfd / archive.c
index 13229777448fe8ee9238eb01c08913e9aeb77c11..9d63849a483d5cd5c5ad40eb6b811bae2c9ae813 100644 (file)
@@ -1468,8 +1468,7 @@ adjust_relative_path (const char * path, const char * ref_path)
 
   if (len > pathbuf_len)
     {
-      if (pathbuf != NULL)
-       free (pathbuf);
+      free (pathbuf);
       pathbuf_len = 0;
       pathbuf = (char *) bfd_malloc (len);
       if (pathbuf == NULL)
@@ -2326,8 +2325,7 @@ _bfd_compute_and_write_armap (bfd *arch, unsigned int elength)
            {
              if (storage > syms_max)
                {
-                 if (syms_max > 0)
-                   free (syms);
+                 free (syms);
                  syms_max = storage;
                  syms = (asymbol **) bfd_malloc (syms_max);
                  if (syms == NULL)
@@ -2408,20 +2406,16 @@ _bfd_compute_and_write_armap (bfd *arch, unsigned int elength)
   ret = BFD_SEND (arch, write_armap,
                  (arch, elength, map, orl_count, stridx));
 
-  if (syms_max > 0)
-    free (syms);
-  if (map != NULL)
-    free (map);
+  free (syms);
+  free (map);
   if (first_name != NULL)
     bfd_release (arch, first_name);
 
   return ret;
 
  error_return:
-  if (syms_max > 0)
-    free (syms);
-  if (map != NULL)
-    free (map);
+  free (syms);
+  free (map);
   if (first_name != NULL)
     bfd_release (arch, first_name);
 
This page took 0.03131 seconds and 4 git commands to generate.