Browse Source

libctf: avoid potential double free

* ctf-link.c (ctf_link_add_cu_mapping): Set t NULL after free.
gdb-13-branch
Alan Modra 4 years ago
parent
commit
57336e2e4d
  1. 5
      libctf/ctf-link.c

5
libctf/ctf-link.c

@ -431,7 +431,10 @@ ctf_link_add_cu_mapping (ctf_dict_t *fp, const char *from, const char *to)
}
}
else
free (t);
{
free (t);
t = NULL;
}
if (ctf_dynhash_insert (one_out, f, NULL) < 0)
{

Loading…
Cancel
Save