forked from enlightenment/efl
eina: fix memory leak when a Eina_Value as promise is returned, but no dispatching Eina_Future is listening on it.
Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com> Differential Revision: https://phab.enlightenment.org/D7652
This commit is contained in:
parent
04c2d313d7
commit
7889f71c7b
|
@ -635,6 +635,11 @@ _eina_promise_clean_dispatch(Eina_Promise *p, Eina_Value v)
|
|||
// This function is called on a promise created with a scheduler, not a continue one.
|
||||
_eina_future_dispatch(p->scheduler, f, v);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Nobody is going to flush this value if we don't
|
||||
eina_value_flush(&v);
|
||||
}
|
||||
eina_mempool_free(_promise_mp, p);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue