Commit c9feddbc authored by Kushagra Sinha's avatar Kushagra Sinha Committed by Commit Bot

Fix use-after-move in AccountManager

Fix use-after-move in chromeos::AccountManager::GetAccountEmailInternal
callback.

Change-Id: I463165fe2e642ffed07c5c11c26984d99daf5815
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2495060Reviewed-by: default avatarAnastasiia N <anastasiian@chromium.org>
Commit-Queue: Kush Sinha <sinhak@chromium.org>
Cr-Commit-Position: refs/heads/master@{#820199}
parent 5268556b
......@@ -388,6 +388,7 @@ void AccountManager::GetAccountEmailInternal(
auto it = accounts_.find(account_key);
if (it == accounts_.end()) {
std::move(callback).Run(std::string());
return;
}
std::move(callback).Run(it->second.raw_email);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment