commit be1778 libdwfl: Fix possible unbounded stack usage in cache_sections.
introduced a memory leak. The refs pointers were copied to the sortrefs
array but never freed. Only the array was freed. Also free the elements.
Signed-off-by: Mark Wielaard <mjw@redhat.com>
+2015-06-06 Mark Wielaard <mjw@redhat.com>
+
+ * derelocate.c (cache_sections): Free sortrefs.
+
2015-06-05 Mark Wielaard <mjw@redhat.com>
* dwfl_segment_report_module.c (dwfl_segment_report_module):
mod->reloc_info->refs[i].relocs = sortrefs[i]->relocs;
mod->reloc_info->refs[i].start = sortrefs[i]->start;
mod->reloc_info->refs[i].end = sortrefs[i]->end;
+ free (sortrefs[i]);
}
free (sortrefs);