diff --git a/AK/Bitmap.h b/AK/Bitmap.h index 1e0564b7db1..6cc1b655d9e 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); } }