chain_success.value = value;
pd->propagating++;
- EINA_INLIST_FREE(pd->callbacks, cb)
+ // This is done on purpose, we are using cb as a reminder to the head of the list
+ while ((cb = (void*) pd->callbacks))
{
// Remove callback early to avoid double execution while
// doing recursive call
chain_fail.error = error;
pd->propagating++;
- EINA_INLIST_FREE(pd->callbacks, cb)
+ // This is done on purpose, we are using cb as a reminder to the head of the list
+ while ((cb = (void*) pd->callbacks))
{
// Remove callback early to avoid double execution while
// doing recursive call