summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel-hollerbach@t-online.de>2016-10-13 10:27:06 +0200
committerMarcel Hollerbach <marcel-hollerbach@t-online.de>2016-10-13 10:33:22 +0200
commitf63ede42818595ae7d92f7a4fe5f053d5c898cee (patch)
tree395ba649a48dd78d63db5d7c2dcd1b07b00f6c22
parent45b103eb0a3a91238f6ee1d66ccb2614925a2e64 (diff)
downloadefl-f63ede42818595ae7d92f7a4fe5f053d5c898cee.tar.gz
ecore: free futures which are still pending on shutdown
otherwise we are leaking a eina list. This was discovered while running the elm_suite with CK_FORK=no, since ecore and eina are init´ed and shutdown´ed, after the shutdown this list points to freeed memory pools. So in the next testcase the list is invalid and crashes. This fixes it with freeing the list on shutdown.
-rw-r--r--src/lib/ecore/ecore_main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/ecore/ecore_main.c b/src/lib/ecore/ecore_main.c
index 6b1ac3ed8c..d1b66a6f1d 100644
--- a/src/lib/ecore/ecore_main.c
+++ b/src/lib/ecore/ecore_main.c
@@ -1598,6 +1598,8 @@ ecore_main_fd_handler_active_set(Ecore_Fd_Handler *fd_handler,
void
_ecore_main_shutdown(void)
{
+ Efl_Future *future;
+
if (in_main_loop)
{
ERR("\n"
@@ -1605,6 +1607,10 @@ _ecore_main_shutdown(void)
"*** Program may crash or behave strangely now.");
return;
}
+
+ EINA_LIST_FREE(_pending_futures, future)
+ efl_del(future);
+
while (fd_handlers)
{
Ecore_Fd_Handler *fdh;