devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=01920b996ad0ab14c454e0aa9e7a876408b6ed62

commit 01920b996ad0ab14c454e0aa9e7a876408b6ed62
Author: Chris Michael <[email protected]>
Date:   Mon Nov 6 10:07:48 2017 -0500

    emotion: Fix data race condition
    
    Coverity reports that we access vfmapped here without holding a lock.
    This patch implements eina_lock_take/release while accessing
    priv->vfmapped.
    
    Fixes Coverity CID1381624
    
    @fix
    
    Signed-off-by: Chris Michael <[email protected]>
---
 src/modules/emotion/gstreamer1/emotion_sink.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/modules/emotion/gstreamer1/emotion_sink.c 
b/src/modules/emotion/gstreamer1/emotion_sink.c
index 6f2e4af49a..5816628a56 100644
--- a/src/modules/emotion/gstreamer1/emotion_sink.c
+++ b/src/modules/emotion/gstreamer1/emotion_sink.c
@@ -137,6 +137,7 @@ emotion_video_sink_dispose(GObject* object)
    sink = EMOTION_VIDEO_SINK(object);
    priv = sink->priv;
 
+   eina_lock_take(&priv->m);
    if (priv->vfmapped)
      {
         if (priv->evas_object)
@@ -166,6 +167,7 @@ emotion_video_sink_dispose(GObject* object)
         priv->last_buffer = NULL;
      }
 
+   eina_lock_release(&priv->m);
    eina_lock_free(&priv->m);
    eina_condition_free(&priv->c);
 

-- 


Reply via email to