Signed-off-by: Mark Wielaard <mark@klomp.org>
+2019-05-09 Mark Wielaard <mark@klomp.org>
+
+ * readelf.c (cleanup_list): New function.
+ (main): Call cleanup_list for dump_data_sections and string_sections.
+
2019-04-28 Mark Wielaard <mark@klomp.org>
* unstrip.c (add_new_section_symbols): Call ELF_CHECK after
static char *yes_str;
static char *no_str;
+static void
+cleanup_list (struct section_argument *list)
+{
+ while (list != NULL)
+ {
+ struct section_argument *a = list;
+ list = a->next;
+ free (a);
+ }
+}
+
int
main (int argc, char *argv[])
{
}
while (++remaining < argc);
+ cleanup_list (dump_data_sections);
+ cleanup_list (string_sections);
+
return error_message_count != 0;
}