Commit d9c7385b authored by Maksim Ivanov's avatar Maksim Ivanov Committed by Commit Bot

Fix use-after-move in //media/capture/video/chromeos/

Fix use-after-move (potential) bugs found by the
"bugprone-use-after-move" clang-tidy check.

Bug: 1122844
Change-Id: Ia1fd975e3e8ed4b4057deb917e11c302307acce1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2557077
Commit-Queue: Ricky Liang <jcliang@chromium.org>
Auto-Submit: Maksim Ivanov <emaxx@chromium.org>
Reviewed-by: default avatarRicky Liang <jcliang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#830881}
parent a3d6c9cd
...@@ -452,8 +452,9 @@ void StreamBufferManager::ReserveBufferFromPool(StreamType stream_type) { ...@@ -452,8 +452,9 @@ void StreamBufferManager::ReserveBufferFromPool(StreamType stream_type) {
stream_context->buffer_dimension, *gfx_format, stream_context->buffer_dimension, *gfx_format,
stream_context->buffer_usage, base::NullCallback()); stream_context->buffer_usage, base::NullCallback());
stream_context->free_buffers.push(vcd_buffer.id); stream_context->free_buffers.push(vcd_buffer.id);
stream_context->buffers.insert(std::make_pair( const int id = vcd_buffer.id;
vcd_buffer.id, BufferPair(std::move(gmb), std::move(vcd_buffer)))); stream_context->buffers.insert(
std::make_pair(id, BufferPair(std::move(gmb), std::move(vcd_buffer))));
} }
void StreamBufferManager::DestroyCurrentStreamsAndBuffers() { void StreamBufferManager::DestroyCurrentStreamsAndBuffers() {
......
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