From c1e902acd9cf3c1fc7c8e0b7c61c25717fcd3aae Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 11 Jul 2021 13:23:27 +0200 Subject: [PATCH] AK: Use kfree_sized() in AK::Vector --- AK/Vector.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AK/Vector.h b/AK/Vector.h index 716fa5ff13c..d65d425a147 100644 --- a/AK/Vector.h +++ b/AK/Vector.h @@ -346,7 +346,7 @@ public: { clear_with_capacity(); if (m_outline_buffer) { - kfree(m_outline_buffer); + kfree_sized(m_outline_buffer, m_capacity * sizeof(StorageType)); m_outline_buffer = nullptr; } reset_capacity(); @@ -636,7 +636,7 @@ public: } } if (m_outline_buffer) - kfree(m_outline_buffer); + kfree_sized(m_outline_buffer, m_capacity * sizeof(StorageType)); m_outline_buffer = new_buffer; m_capacity = new_capacity; return true;