summaryrefslogtreecommitdiff
path: root/src/lib/eina
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-02-08 16:20:17 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-02-08 21:19:39 +0900
commit7b736d20b8c198c40d8f818fd3469bed882cd323 (patch)
tree36addd59b5297600d2b6f8c72614ddb6de59f6c3 /src/lib/eina
parent144092b2fac39a8e70606130ab05afda7faa240a (diff)
eina share - fix spinlock release if magic check fails on share data
this fixes a potential double spinlock unrelease if magic check fails on share data. this fixes CID 1367493
Diffstat (limited to 'src/lib/eina')
-rw-r--r--src/lib/eina/eina_share_common.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/eina/eina_share_common.c b/src/lib/eina/eina_share_common.c
index 33142dcbb0..7fb8f90a96 100644
--- a/src/lib/eina/eina_share_common.c
+++ b/src/lib/eina/eina_share_common.c
@@ -766,11 +766,11 @@ eina_share_common_add_length(Eina_Share *share,
766 el = _eina_share_common_head_find(ed, str, slen); 766 el = _eina_share_common_head_find(ed, str, slen);
767 if (el) 767 if (el)
768 { 768 {
769 EINA_MAGIC_CHECK_SHARE_COMMON_NODE(el, 769 EINA_MAGIC_CHECK_SHARE_COMMON_NODE
770 share->node_magic, 770 (el, share->node_magic,
771 eina_spinlock_release(&_mutex_big)); 771 eina_spinlock_release(&_mutex_big); return NULL);
772 el->references++; 772 el->references++;
773 eina_spinlock_release(&_mutex_big); 773 eina_spinlock_release(&_mutex_big);
774 return el->str; 774 return el->str;
775 } 775 }
776 776