table->sequences is a linked list before it is replaced by a bfd_alloc
array in sort_line_sequences.
PR 22191
* dwarf2.c (decode_line_info): Properly free line sequences on error.
2017-09-24 Alan Modra <amodra@gmail.com>
+ PR 22191
+ * dwarf2.c (decode_line_info): Properly free line sequences on error.
+
+2017-09-24 Alan Modra <amodra@gmail.com>
+
PR 22187
* dwarf2.c (find_abstract_instance_name): Add orig_info_ptr and
pname param. Return status. Make name const. Don't abort,
return table;
fail:
- if (table->sequences != NULL)
- free (table->sequences);
+ while (table->sequences != NULL)
+ {
+ struct line_sequence* seq = table->sequences;
+ table->sequences = table->sequences->prev_sequence;
+ free (seq);
+ }
if (table->files != NULL)
free (table->files);
if (table->dirs != NULL)