diff options
author | Andreas Kling <kling@serenityos.org> | 2021-07-11 13:23:27 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-07-11 14:14:51 +0200 |
commit | c1e902acd9cf3c1fc7c8e0b7c61c25717fcd3aae (patch) | |
tree | abc3e99ae5e098909e8b8a0ff53779b9e7f81801 | |
parent | c68c3fa69cefe1f7f7981a6cc7fcba4d510d3f52 (diff) | |
download | serenity-c1e902acd9cf3c1fc7c8e0b7c61c25717fcd3aae.zip |
AK: Use kfree_sized() in AK::Vector
-rw-r--r-- | AK/Vector.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/AK/Vector.h b/AK/Vector.h index 716fa5ff13..d65d425a14 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; |