summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-07-11 13:23:27 +0200
committerAndreas Kling <kling@serenityos.org>2021-07-11 14:14:51 +0200
commitc1e902acd9cf3c1fc7c8e0b7c61c25717fcd3aae (patch)
treeabc3e99ae5e098909e8b8a0ff53779b9e7f81801
parentc68c3fa69cefe1f7f7981a6cc7fcba4d510d3f52 (diff)
downloadserenity-c1e902acd9cf3c1fc7c8e0b7c61c25717fcd3aae.zip
AK: Use kfree_sized() in AK::Vector
-rw-r--r--AK/Vector.h4
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;