[CONPRO-1212] Removing invocation of lock_guard destructor. 45/174245/1
authorHarry <h.marappa@samsung.com>
Wed, 31 Jan 2018 09:22:21 +0000 (14:52 +0530)
committerAmit KS <amit.s12@samsung.com>
Thu, 29 Mar 2018 08:47:49 +0000 (14:17 +0530)
commit1dacc7d60c9ec5cadd0999f25ab17889f9bff4c4
treefffec05bca5c1ada52fca8cb49280e2ec1b23ee1
parentf046f1dcba02a0769b90904d593eed7d2be09d29
 [CONPRO-1212] Removing invocation of lock_guard destructor.

std::lock_guard follows RAII for std::mutex. Invoking
std::lock_guard<std::mutex>::~lock_guard() makes unlock
call twice on underlying mutex. As per the API documentation
calling unlock from thread which does not own lock results in
undefined behaviour.

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/243
(cherry picked from commit fc681e089d3bbbbd16f90ad05d53208f9a1602d1)

Change-Id: I56512847cb3411db81bd93eb55a4dc1c34a25d83
Signed-off-by: Harry <h.marappa@samsung.com>
Signed-off-by: Amit KS <amit.s12@samsung.com>
service/resource-encapsulation/src/resourceCache/src/ResourceCacheManager.cpp