From: Carsten Haitzler (Rasterman) Date: Wed, 8 Feb 2017 07:20:17 +0000 (+0900) Subject: eina share - fix spinlock release if magic check fails on share data X-Git-Tag: upstream/1.20.0~2131 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7b736d20b8c198c40d8f818fd3469bed882cd323;p=platform%2Fupstream%2Fefl.git 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 --- diff --git a/src/lib/eina/eina_share_common.c b/src/lib/eina/eina_share_common.c index 33142dc..7fb8f90 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, el = _eina_share_common_head_find(ed, str, slen); if (el) { - EINA_MAGIC_CHECK_SHARE_COMMON_NODE(el, - share->node_magic, - eina_spinlock_release(&_mutex_big)); + EINA_MAGIC_CHECK_SHARE_COMMON_NODE + (el, share->node_magic, + eina_spinlock_release(&_mutex_big); return NULL); el->references++; - eina_spinlock_release(&_mutex_big); + eina_spinlock_release(&_mutex_big); return el->str; }