+2015-12-01 Mark Wielaard <mjw@redhat.com>
+
+ * test-flag-nobits.c (main): Call elf_end.
+ * rerequest_tag.c (main): Call dwarf_end.
+ * funcscopes.c (handle_function): Free scopes.
+ * dwarf-getstring.c (main): Call dwarf_end.
+ * allregs.c (main): Free state.info.
+ * alldts.c (main): Free dyn.
+ * addrcfi.c (handle_address): Free stuff.frame between handle_cfi
+ calls.
+ * addrscopes.c (handle_address): Free scopes.
+
2015-10-16 Mark Wielaard <mjw@redhat.com>
* Makefile.am [BUILD_STATIC] (libdw): Add -lz.
Dwfl_Module *mod = dwfl_addrmodule (dwfl, pc);
struct stuff stuff;
- return (handle_cfi (dwfl, ".eh_frame",
- dwfl_module_eh_cfi (mod, &stuff.bias), pc, &stuff)
- & handle_cfi (dwfl, ".debug_frame",
- dwfl_module_dwarf_cfi (mod, &stuff.bias), pc, &stuff));
+ stuff.frame = NULL;
+ stuff.bias = 0;
+ int res = handle_cfi (dwfl, ".eh_frame",
+ dwfl_module_eh_cfi (mod, &stuff.bias), pc, &stuff);
+ free (stuff.frame);
+
+ stuff.frame = NULL;
+ stuff.bias = 0;
+ res &= handle_cfi (dwfl, ".debug_frame",
+ dwfl_module_dwarf_cfi (mod, &stuff.bias), pc, &stuff);
+ free (stuff.frame);
+
+ return res;
}
int
print_vars (indent + INDENT, die);
}
+ free (scopes);
}
}
/* And the data allocated in the .shstrtab section. */
free (data->d_buf);
+ /* And the dynamic entries. */
+ free (dyn);
+
/* All done. */
if (elf_end (elf) != 0)
{
dwarf_encoding_string (state.info[i].type),
state.info[i].bits);
}
+ free (state.info);
}
else
do
offset += len + 1;
}
+ dwarf_end (dbg);
close (fd);
}
print_vars (indent + INDENT, die);
}
+ free (scopes);
}
return 0;
assert (die == &die_mem);
assert (dwarf_tag (die) == 0);
+ dwarf_end (dw);
return 0;
}
Elf_Scn *scn = NULL;
while ((scn = elf_nextscn (stripped, scn)) != NULL)
elf_flagdata (elf_getdata (scn, NULL), ELF_C_SET, ELF_F_DIRTY);
+
+ elf_end (stripped);
+ return 0;
}