forked from enlightenment/efl
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 <cp.michael@samsung.com>
This commit is contained in:
parent
fd79e32dbd
commit
01920b996a
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue