summaryrefslogtreecommitdiff
path: root/src/lib/eina
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2019-01-11 17:57:40 -0800
committerCedric BAIL <cedric.bail@free.fr>2019-01-23 12:07:17 -0800
commit7889f71c7bf6e9cb5a3976aa60cd060b1fb3c003 (patch)
tree100f9a7a2de3c465aba212ed91fa91397284a8aa /src/lib/eina
parent04c2d313d7e9c798395949591639c705bc1f1710 (diff)
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
Diffstat (limited to 'src/lib/eina')
-rw-r--r--src/lib/eina/eina_promise.c5
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)
635 // This function is called on a promise created with a scheduler, not a continue one. 635 // This function is called on a promise created with a scheduler, not a continue one.
636 _eina_future_dispatch(p->scheduler, f, v); 636 _eina_future_dispatch(p->scheduler, f, v);
637 } 637 }
638 else
639 {
640 // Nobody is going to flush this value if we don't
641 eina_value_flush(&v);
642 }
638 eina_mempool_free(_promise_mp, p); 643 eina_mempool_free(_promise_mp, p);
639} 644}
640 645