From 6950dd220bcc1ba63cc2bdab807b80de880aa352 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 11 Jul 2021 13:22:27 +0200 Subject: [PATCH] AK: Use kfree_sized() in AK::Bitmap --- AK/Bitmap.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/AK/Bitmap.h b/AK/Bitmap.h index 1e0564b7db..6cc1b655d9 100644 --- a/AK/Bitmap.h +++ b/AK/Bitmap.h @@ -49,7 +49,7 @@ public: Bitmap& operator=(Bitmap&& other) { if (this != &other) { - kfree(m_data); + kfree_sized(m_data, size_in_bytes()); m_data = exchange(other.m_data, nullptr); m_size = exchange(other.m_size, 0); } @@ -59,7 +59,7 @@ public: ~Bitmap() { if (m_is_owning) { - kfree(m_data); + kfree_sized(m_data, size_in_bytes()); } m_data = nullptr; } @@ -107,7 +107,7 @@ public: __builtin_memcpy(m_data, previous_data, previous_size_bytes); if (previous_size % 8) set_range(previous_size, 8 - previous_size % 8, default_value); - kfree(previous_data); + kfree_sized(previous_data, previous_size_bytes); } }