diff options
author | Nick Alcock <nick.alcock@oracle.com> | 2025-01-13 14:49:14 +0000 |
---|---|---|
committer | Nick Alcock <nick.alcock@oracle.com> | 2025-02-28 15:13:23 +0000 |
commit | 69d4f6d74cff8916bdfefa221ef84d40ebe4b3e7 (patch) | |
tree | b49ccf5e756010e5b45e0013beaea7e0a740ca9f | |
parent | 21f748e1e34f9ec386834fb8dbf7581607fcccbe (diff) | |
download | binutils-69d4f6d74cff8916bdfefa221ef84d40ebe4b3e7.zip binutils-69d4f6d74cff8916bdfefa221ef84d40ebe4b3e7.tar.gz binutils-69d4f6d74cff8916bdfefa221ef84d40ebe4b3e7.tar.bz2 |
libctf, string: remove movable refs properly
Ever since pending refs were replaced with movable refs, we were failing
to remove movable ref backpointers properly on ctf_remove_ref. I don't
see how this could cause any problem but a memory leak, but since we
do ultimately write down refs, leaking references to refs is still
risky: best to fix this.
-rw-r--r-- | libctf/ctf-string.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libctf/ctf-string.c b/libctf/ctf-string.c index 84f0e0d..4a26541 100644 --- a/libctf/ctf-string.c +++ b/libctf/ctf-string.c @@ -611,6 +611,7 @@ ctf_str_remove_ref (ctf_dict_t *fp, const char *str, uint32_t *ref) if (aref->caf_ref == ref) { ctf_list_delete (&atom->csa_refs, aref); + ctf_dynhash_remove (fp->ctf_str_movable_refs, ref); free (aref); } } |