[CONPRO-1212] Removing invocation of lock_guard destructor. 19/174219/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 07:02:38 +0000 (12:32 +0530)
commite4d4ccfd5834a4ca7aece15477511c2d96acbbcf
tree7ff112182d45e1c88868001b19de0695036fa813
parentd96c432bfd8015444e4857fafab34d6a361b0ef8
[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: I9ef2f3eed0e4989a7d73ad1ab40a3bae0a01a11c
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