summaryrefslogtreecommitdiff
path: root/src/lib/evas/common
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-07-11 21:45:39 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-07-11 21:45:39 +0900
commit98a02fc17c8d630068684385f74787bfc26183cf (patch)
tree015547bd4ca62d0c8c9c6a62f26e5253f265ffab /src/lib/evas/common
parentea99e6288d8aa03aad0f1763ec0e8160ffeb08d9 (diff)
evas scale cache - address possible coverity deadlock
this should fix CID 1106338 where we don't lock and unlock caches in the same order.
Diffstat (limited to 'src/lib/evas/common')
-rw-r--r--src/lib/evas/common/evas_image_scalecache.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/evas/common/evas_image_scalecache.c b/src/lib/evas/common/evas_image_scalecache.c
index 16c4451..978a4cb 100644
--- a/src/lib/evas/common/evas_image_scalecache.c
+++ b/src/lib/evas/common/evas_image_scalecache.c
@@ -802,7 +802,10 @@ evas_common_rgba_image_scalecache_do_cbs(Image_Entry *ie, RGBA_Image *dst,
802 ct = evas_common_draw_context_new(); 802 ct = evas_common_draw_context_new();
803 evas_common_draw_context_set_render_op(ct, _EVAS_RENDER_COPY); 803 evas_common_draw_context_set_render_op(ct, _EVAS_RENDER_COPY);
804 } 804 }
805 SLKU(cache_lock);
805 SLKU(im->cache.lock); 806 SLKU(im->cache.lock);
807
808 SLKL(cache_lock);
806 if (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888) 809 if (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888)
807 { 810 {
808#ifdef EVAS_CSERVE2 811#ifdef EVAS_CSERVE2
@@ -812,7 +815,10 @@ evas_common_rgba_image_scalecache_do_cbs(Image_Entry *ie, RGBA_Image *dst,
812#endif 815#endif
813 evas_cache_image_load_data(&im->cache_entry); 816 evas_cache_image_load_data(&im->cache_entry);
814 } 817 }
818 SLKU(cache_lock);
819
815 SLKL(im->cache.lock); 820 SLKL(im->cache.lock);
821 SLKL(cache_lock);
816 evas_common_image_colorspace_normalize(im); 822 evas_common_image_colorspace_normalize(im);
817 if (im->image.data) 823 if (im->image.data)
818 { 824 {