cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=7889f71c7bf6e9cb5a3976aa60cd060b1fb3c003
commit 7889f71c7bf6e9cb5a3976aa60cd060b1fb3c003 Author: Cedric BAIL <cedric.b...@free.fr> Date: Fri Jan 11 17:57:40 2019 -0800 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....@samsung.com> Differential Revision: https://phab.enlightenment.org/D7652 --- src/lib/eina/eina_promise.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lib/eina/eina_promise.c b/src/lib/eina/eina_promise.c index 1937c17d90..f2dc9cccac 100644 --- a/src/lib/eina/eina_promise.c +++ b/src/lib/eina/eina_promise.c @@ -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); } --