Do defensive programming by using zfree() to initialize freed pointers
to NULL, so that eventual use after free result in a NULL pointer deref
instead of more subtle behaviour.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
static void exit_rel(struct rel_info *ri)
{
- free(ri->sorted);
+ zfree(&ri->sorted);
}
static bool get_plt_sizes(struct dso *dso, GElf_Ehdr *ehdr, GElf_Shdr *shdr_plt,
static void exit_rela_dyn(struct rela_dyn_info *di)
{
- free(di->sorted);
+ zfree(&di->sorted);
}
static int cmp_offset(const void *a, const void *b)