Fix for double free in RE cache unit test.
authorKIM JungYong <jyong2.kim@samsung.com>
Thu, 13 Apr 2017 07:05:28 +0000 (16:05 +0900)
committerUze Choi <uzchoi@samsung.com>
Mon, 17 Apr 2017 04:25:25 +0000 (04:25 +0000)
commitadf2b45fbf966a4a87f8ccf2c0157856c41e0493
treec39c945918c442dbf77d24d0a67b1bdbffceb346
parent17b7f943079e5bb9f895f440133fbd7fd3c7ce4f
Fix for double free in RE cache unit test.

[Problem]
When RE cache unit test is terminated,
always will crash af double free.

[Reason]
double freed valiable is shared pointer of mock object.
this pointer will remove twice on release of mock object and shared pointer.

[Fix]
Deleter as non-operation was added on the creation of shared pointer.

Change-Id: I6434795fd011312b1a9bcb5ecf0d092aab19b487
Signed-off-by: KIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18893
Reviewed-by: Jay Sharma <jay.sharma@samsung.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
service/resource-encapsulation/src/resourceCache/unittests/DataCacheTest.cpp
service/resource-encapsulation/src/resourceCache/unittests/ResourceCacheTest.cpp