Fix a bug that master key is delivered into async thread by reference 10/113110/2
authorSungbae Yoo <sungbae.yoo@samsung.com>
Mon, 6 Feb 2017 06:08:28 +0000 (15:08 +0900)
committerSungbae Yoo <sungbae.yoo@samsung.com>
Mon, 6 Feb 2017 06:15:51 +0000 (22:15 -0800)
Signed-off-by: Sungbae Yoo <sungbae.yoo@samsung.com>
Change-Id: I7fc87cb9eeb6cb0d75ae6da4d515621fee54e12d

server/external-encryption.cpp
server/internal-encryption.cpp

index 42d3b04..7ca0c8d 100644 (file)
@@ -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();
index 01b3ea5..45533e4 100644 (file)
@@ -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");