fix memory issue

we assigned NULL to a entry that was preexisting
This commit is contained in:
Marcel Hollerbach 2022-07-10 09:49:49 +02:00
parent 41da42207d
commit d6759ca3ea
1 changed files with 3 additions and 3 deletions

View File

@ -32,7 +32,6 @@ _timed_del(void *data)
{
Entry *e = data;
_del_key(e->name);
e->timer = NULL;
return 0;
}
@ -104,16 +103,17 @@ _del_key(const char *name)
//deref the entry
e->ref --;
if (e->timer) ecore_timer_del(e->timer);
if (e->ref == 1)
{
if (e->timer) ecore_timer_del(e->timer);
e->timer = ecore_timer_add(0.5, _timed_del, e);
}
//free if null
if (e->ref == 0)
{
e->timer = NULL;
//if ref is 0 nuke out that entry
eina_hash_del_by_key(string_hash, name);
//we need to update the notify visuals depending on the state of the box