aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/elementary
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-07-24 18:33:52 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-07-24 18:44:15 +0900
commit8c9adcb6161ac74ddf4649bd63e73149fea82e6c (patch)
tree8e09e10f974965c1f6285e6ccac7d45532f1103d /src/lib/elementary
parentefl ui video - fix coverity CID 1356997 (diff)
downloadefl-8c9adcb6161ac74ddf4649bd63e73149fea82e6c.tar.gz
efl ui image async locking -fix CID 1356199 - locked data cant be messed with
this addresses a coverity issue that in theory looks right fix CID 1356199 @fix
Diffstat (limited to 'src/lib/elementary')
-rw-r--r--src/lib/elementary/efl_ui_image.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/lib/elementary/efl_ui_image.c b/src/lib/elementary/efl_ui_image.c
index dad075496f..e65b95c510 100644
--- a/src/lib/elementary/efl_ui_image.c
+++ b/src/lib/elementary/efl_ui_image.c
@@ -257,10 +257,13 @@ _efl_ui_image_async_open_do(void *data, Ecore_Thread *thread EINA_UNUSED)
done = sd->async.done;
sd->async.todo = NULL;
sd->async.done = NULL;
- eina_spinlock_release(&sd->async.lck);
if (done) _async_open_data_free(done);
- if (!todo) return;
+ if (!todo)
+ {
+ eina_spinlock_release(&sd->async.lck);
+ return;
+ }
begin:
if (todo->f_set)
@@ -272,7 +275,6 @@ begin:
if (!f)
{
todo->failed = EINA_TRUE;
- eina_spinlock_take(&sd->async.lck);
sd->async.done = todo;
eina_spinlock_release(&sd->async.lck);
return;
@@ -281,6 +283,7 @@ begin:
else
{
CRI("Async open has no input file!");
+ eina_spinlock_release(&sd->async.lck);
return;
}
@@ -288,6 +291,7 @@ begin:
{
if (!todo->f_set) eina_file_close(f);
_async_open_data_free(todo);
+ eina_spinlock_release(&sd->async.lck);
return;
}
@@ -301,6 +305,7 @@ begin:
if (map) eina_file_map_free(f, map);
if (!todo->f_set) eina_file_close(f);
_async_open_data_free(todo);
+ eina_spinlock_release(&sd->async.lck);
return;
}
@@ -312,11 +317,9 @@ begin:
done->f_open = f;
done->map = map;
- eina_spinlock_take(&sd->async.lck);
todo = sd->async.todo;
sd->async.todo = NULL;
if (!todo) sd->async.done = done;
- eina_spinlock_release(&sd->async.lck);
if (todo)
{
@@ -324,6 +327,7 @@ begin:
_async_open_data_free(done);
goto begin;
}
+ eina_spinlock_release(&sd->async.lck);
}
static void