From 325aca33ad4a4340d62db060bb3f50f4e6aa0a14 Mon Sep 17 00:00:00 2001 From: Sourabh Betigeri Date: Thu, 16 Jun 2022 15:40:01 -0700 Subject: [PATCH] SWDEV-342067 - Fixes a minor coding error to loop through all the entries in the map Change-Id: I837cb4868de2acd3e71ca9a745a62ed0bb2d1400 [ROCm/clr commit: 5ad38a32bf2f35f557f8d3d0e700e0b5fc3435ac] --- projects/clr/hipamd/src/hip_mempool_impl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/clr/hipamd/src/hip_mempool_impl.cpp b/projects/clr/hipamd/src/hip_mempool_impl.cpp index 84e8e4a526..852ce95823 100644 --- a/projects/clr/hipamd/src/hip_mempool_impl.cpp +++ b/projects/clr/hipamd/src/hip_mempool_impl.cpp @@ -122,8 +122,8 @@ bool Heap::ReleaseAllMemory(hip::Stream* stream) { // ================================================================================================ void Heap::RemoveStream(hip::Stream* stream) { - for (auto it = allocations_.begin(); it != allocations_.end();) { - it->second.safe_streams_.erase(stream); + for (auto it : allocations_) { + it.second.safe_streams_.erase(stream); } }