diff options
author | Cedric BAIL <cedric.bail@free.fr> | 2019-01-11 17:57:40 -0800 |
---|---|---|
committer | Cedric BAIL <cedric.bail@free.fr> | 2019-01-23 12:07:17 -0800 |
commit | 7889f71c7bf6e9cb5a3976aa60cd060b1fb3c003 (patch) | |
tree | 100f9a7a2de3c465aba212ed91fa91397284a8aa | |
parent | 04c2d313d7e9c798395949591639c705bc1f1710 (diff) | |
download | efl-7889f71c7bf6e9cb5a3976aa60cd060b1fb3c003.tar.gz |
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
-rw-r--r-- | src/lib/eina/eina_promise.c | 5 |
1 files changed, 5 insertions, 0 deletions
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); } |