libctf: avoid potential double free
* ctf-link.c (ctf_link_add_cu_mapping): Set t NULL after free.
This commit is contained in:
parent
b0f110a5ea
commit
57336e2e4d
1 changed files with 4 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue