From: Oleksii Beketov Date: Thu, 13 Feb 2020 11:53:23 +0000 (+0200) Subject: [CONPRO-1564] Doxm deadlock X-Git-Tag: submit/tizen/20200219.001638~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F87%2F225287%2F2;p=platform%2Fupstream%2Fiotivity.git [CONPRO-1564] Doxm deadlock Deadlock in case of not supported oxm method fixed https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/665 (cherry-picked from 2ce7a0c66285f62eeac4db9260cea0f077adf2ad) Change-Id: I280d323cd27eccfe233e0ea91efc2a4cb393591e Signed-off-by: Oleksii Beketov Signed-off-by: DoHyun Pyun --- diff --git a/resource/csdk/security/src/doxmresource.c b/resource/csdk/security/src/doxmresource.c index 98c8405..91f104d 100644 --- a/resource/csdk/security/src/doxmresource.c +++ b/resource/csdk/security/src/doxmresource.c @@ -1449,6 +1449,10 @@ static OCEntityHandlerResult HandleDoxmPostRequest(OCEntityHandlerRequest * ehRe if (false == ValidateOxmsel(gDoxm->oxm, gDoxm->oxmLen, &newDoxm->oxmSel)) { OIC_LOG(ERROR, TAG, "Not acceptable request because oxmsel does not support on Server"); + if (NULL != g_mutexDoxm) + { + oc_mutex_unlock(g_mutexDoxm); + } ehRet = OC_EH_NOT_ACCEPTABLE; goto exit; } @@ -1546,6 +1550,10 @@ static OCEntityHandlerResult HandleDoxmPostRequest(OCEntityHandlerRequest * ehRe if (false == ValidateOxmsel(gDoxm->oxm, gDoxm->oxmLen, &newDoxm->oxmSel)) { OIC_LOG(ERROR, TAG, "Not acceptable request because oxmsel does not support on Server"); + if (NULL != g_mutexDoxm) + { + oc_mutex_unlock(g_mutexDoxm); + } ehRet = OC_EH_NOT_ACCEPTABLE; goto exit; }