If libdw dwarf_offdie fails free cu structure.
Signed-off-by: Mark Wielaard <mjw@redhat.com>
2013-09-12 Mark Wielaard <mjw@redhat.com>
+ * cu.c (intern_cu): If dwarf_offdie fails free cu.
+
+2013-09-12 Mark Wielaard <mjw@redhat.com>
+
* linux-proc-maps.c (proc_maps_report): Don't fclose FILE in
bad_report.
/* XXX use non-searching lookup */
Dwarf_Die *die = INTUSE(dwarf_offdie) (mod->dw, cuoff, &cu->die);
if (die == NULL)
- return DWFL_E_LIBDW;
+ {
+ free (cu);
+ return DWFL_E_LIBDW;
+ }
assert (die == &cu->die);
struct dwfl_cu **newvec = realloc (mod->cu, ((mod->ncu + 1)