If dwarf_getscopes_die () fails then scopes might not be reset and we
could cause a double free.
Signed-off-by: Mark Wielaard <mjw@redhat.com>
+2015-05-21 Mark Wielaard <mjw@redhat.com>
+
+ * addr2line.c (handle_address): Set scopes to NULL after free.
+
2015-05-20 Mark Wielaard <mjw@redhat.com>
* addr2line.c (OPT_PRETTY): New constant define.
dwarf_offdie (dwfl_module_getdwarf (mod, &bias),
dieoff, &subroutine);
free (scopes);
+ scopes = NULL;
nscopes = dwarf_getscopes_die (&subroutine, &scopes);
if (nscopes > 1)