mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-05-23 02:06:48 +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:
@ -431,7 +431,10 @@ ctf_link_add_cu_mapping (ctf_dict_t *fp, const char *from, const char *to)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
free (t);
|
free (t);
|
||||||
|
t = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (ctf_dynhash_insert (one_out, f, NULL) < 0)
|
if (ctf_dynhash_insert (one_out, f, NULL) < 0)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user