bu5hm4n pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=46131ea80c76de393536adb90d73dba1ce1ed902

commit 46131ea80c76de393536adb90d73dba1ce1ed902
Author: Marcel Hollerbach <[email protected]>
Date:   Tue Dec 27 17:49:35 2016 +0100

    ecore_thread: null out the struct before returning it
    
    it can contain old callback values which are not overwritten in every
    case. This just ensures that in both cases, empty trasher or none empty
    trasher, are returning the same state of the struct.
---
 src/lib/ecore/ecore_thread.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/lib/ecore/ecore_thread.c b/src/lib/ecore/ecore_thread.c
index 06cd24d..8af47af 100644
--- a/src/lib/ecore/ecore_thread.c
+++ b/src/lib/ecore/ecore_thread.c
@@ -537,6 +537,10 @@ _ecore_thread_worker_new(void)
        result = calloc(1, sizeof(Ecore_Pthread_Worker));
        _ecore_thread_worker_count++;
      }
+   else
+     {
+        memset(result, 0,  sizeof(Ecore_Pthread_Worker));
+     }
 
    SLKI(result->cancel_mutex);
    LKI(result->mutex);

-- 


Reply via email to