mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-03-01 13:26:47 +08:00
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
@ -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…
Reference in New Issue
Block a user