+2021-01-27 Nick Clifton <nickc@redhat.com>
+
+ * objcopy.c (copy_main): Remove conditional control of the calls
+ to free, simplifying the code and making it easier to detect
+ typos.
+
2021-01-26 Frederic Cambus <fred@statdns.com>
* objcopy.c (copy_main): Fix a double free happening when both
pe->timestamp = pe_data (ibfd)->coff.timestamp;
}
- if (isympp)
- free (isympp);
+ free (isympp);
if (osympp != isympp)
free (osympp);
(*relpp[i]->sym_ptr_ptr)->flags |= BSF_KEEP;
}
- if (relpp != NULL)
- free (relpp);
+ free (relpp);
}
/* Write out debugging information. */
}
}
- if (strip_specific_buffer)
- free (strip_specific_buffer);
-
- if (strip_unneeded_buffer)
- free (strip_unneeded_buffer);
-
- if (keep_specific_buffer)
- free (keep_specific_buffer);
-
- if (localize_specific_buffer)
- free (localize_specific_buffer);
-
- if (globalize_specific_buffer)
- free (globalize_specific_buffer);
-
- if (keepglobal_specific_buffer)
- free (keepglobal_specific_buffer);
-
- if (weaken_specific_buffer)
- free (weaken_specific_buffer);
+ free (strip_specific_buffer);
+ free (strip_unneeded_buffer);
+ free (keep_specific_buffer);
+ free (localize_specific_buffer);
+ free (globalize_specific_buffer);
+ free (keepglobal_specific_buffer);
+ free (weaken_specific_buffer);
return 0;
}