projects
/
binutils-gdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b0f110a
)
libctf: avoid potential double free
author
Alan Modra
<amodra@gmail.com>
Thu, 8 Dec 2022 01:15:12 +0000
(11:45 +1030)
committer
Alan Modra
<amodra@gmail.com>
Thu, 8 Dec 2022 01:16:22 +0000
(11:46 +1030)
* ctf-link.c (ctf_link_add_cu_mapping): Set t NULL after free.
libctf/ctf-link.c
patch
|
blob
|
history
diff --git
a/libctf/ctf-link.c
b/libctf/ctf-link.c
index 702f2b4d5feac154ebba5998c6de600b2a4e6506..902b4408cd66197059cda7a91193317f6502b970 100644
(file)
--- a/
libctf/ctf-link.c
+++ b/
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)
{