Commit 9032a651 authored by Chris Michael's avatar Chris Michael Committed by Carsten Haitzler (Rasterman)

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: default avatarChris Michael <cp.michael@samsung.com>
parent 0ac05964
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment