mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-07-15 05:01:13 +08:00
libctf: fix hash removal
We must call htab_remove_elt with an element (in this case, a mocked-up one with only the key populated, since no reasonable hash function will need the other fields), not with the key alone. libctf/ * ctf-hash.c (ctf_dynhash_remove): Call with a mocked-up element.
This commit is contained in:
@ -176,7 +176,8 @@ ctf_dynhash_insert (ctf_dynhash_t *hp, void *key, void *value)
|
||||
void
|
||||
ctf_dynhash_remove (ctf_dynhash_t *hp, const void *key)
|
||||
{
|
||||
htab_remove_elt (hp->htab, (void *) key);
|
||||
ctf_helem_t hep = { (void *) key, NULL, NULL, NULL };
|
||||
htab_remove_elt (hp->htab, &hep);
|
||||
}
|
||||
|
||||
void *
|
||||
|
Reference in New Issue
Block a user