Commit 01f69f67 authored by Maksim Ivanov's avatar Maksim Ivanov Committed by Commit Bot

Fix double-callback-call crash in //remoting/host/file_transfer/

Fix bug found by the "bugprone-use-after-move" clang-tidy check.

Bug: 1122844
Change-Id: I0b3d37aeebc855e62b5f42af5d886b53fab1dc6c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2386728
Commit-Queue: Joe Downing <joedow@chromium.org>
Reviewed-by: default avatarJoe Downing <joedow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#803547}
parent e5e16a75
...@@ -430,6 +430,7 @@ void LocalFileWriter::OnCreateResult(Callback callback, ...@@ -430,6 +430,7 @@ void LocalFileWriter::OnCreateResult(Callback callback,
SetState(FileOperations::kFailed); SetState(FileOperations::kFailed);
std::move(callback).Run(protocol::MakeFileTransferError( std::move(callback).Run(protocol::MakeFileTransferError(
FROM_HERE, FileErrorToResponseErrorType(error), error)); FROM_HERE, FileErrorToResponseErrorType(error), error));
return;
} }
SetState(FileOperations::kReady); SetState(FileOperations::kReady);
......
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