From: Sungbae Yoo Date: Mon, 6 Feb 2017 06:08:28 +0000 (+0900) Subject: Fix a bug that master key is delivered into async thread by reference X-Git-Tag: accepted/tizen/common/20170213.174442~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F10%2F113110%2F2;p=platform%2Fcore%2Fsecurity%2Fode.git Fix a bug that master key is delivered into async thread by reference Signed-off-by: Sungbae Yoo Change-Id: I7fc87cb9eeb6cb0d75ae6da4d515621fee54e12d --- diff --git a/server/external-encryption.cpp b/server/external-encryption.cpp index 42d3b04..7ca0c8d 100644 --- a/server/external-encryption.cpp +++ b/server/external-encryption.cpp @@ -224,7 +224,7 @@ int ExternalEncryption::encrypt(const std::string &password, unsigned int option } KeyManager::data MasterKey = keyManager.getMasterKey(pwData); - auto encryptWorker = [&MasterKey, options, this]() { + auto encryptWorker = [MasterKey, options, this]() { try { INFO("Close all applications using external storage..."); killDependedApplications(); diff --git a/server/internal-encryption.cpp b/server/internal-encryption.cpp index 01b3ea5..45533e4 100644 --- a/server/internal-encryption.cpp +++ b/server/internal-encryption.cpp @@ -178,7 +178,7 @@ int InternalEncryption::encrypt(const std::string& password, unsigned int option } KeyManager::data MasterKey = keyManager.getMasterKey(pwData); - auto encryptWorker = [&MasterKey, options, this]() { + auto encryptWorker = [MasterKey, options, this]() { try { showProgressUI("Encrypting");