remove the entry from the list, before freeing
This commit is contained in:
parent
ba3b78d968
commit
7109999b92
@ -275,7 +275,11 @@ static void safe_hash_change(SAFE_HASH *hash, byte *old_data, byte *new_data)
|
|||||||
if (entry->data == old_data)
|
if (entry->data == old_data)
|
||||||
{
|
{
|
||||||
if (new_data == hash->default_value)
|
if (new_data == hash->default_value)
|
||||||
|
{
|
||||||
|
if ((*entry->prev= entry->next))
|
||||||
|
entry->next->prev= entry->prev;
|
||||||
hash_delete(&hash->hash, (byte*) entry);
|
hash_delete(&hash->hash, (byte*) entry);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
entry->data= new_data;
|
entry->data= new_data;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user