Skip to content

Commit 7cec5bf

Browse files
committed
Fixes data leak in old cache impl as well
1 parent eab471d commit 7cec5bf

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

include/nbl/core/containers/FixedCapacityDoublyLinkedList.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,12 @@ class [[deprecated]] FixedCapacityDoublyLinkedList : private impl::FixedCapacity
178178
{
179179
auto* begin = getBegin();
180180
auto* back = getBack();
181-
do
181+
while (begin != back)
182182
{
183183
m_dispose_f(begin->data);
184184
begin = get(begin->next);
185-
} while (begin != back);
185+
}
186+
m_dispose_f(back->data);
186187
}
187188
_NBL_ALIGNED_FREE(m_reservedSpace);
188189
}

0 commit comments

Comments
 (0)