AK: Fix leak in HashTable move assignment operator.
This commit is contained in:
parent
b51031bb54
commit
e88c8eae6a
Notes:
sideshowbarker
2024-07-19 15:52:44 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/e88c8eae6a6
1 changed files with 1 additions and 0 deletions
|
@ -33,6 +33,7 @@ public:
|
||||||
HashTable& operator=(HashTable&& other)
|
HashTable& operator=(HashTable&& other)
|
||||||
{
|
{
|
||||||
if (this != &other) {
|
if (this != &other) {
|
||||||
|
clear();
|
||||||
m_buckets = other.m_buckets;
|
m_buckets = other.m_buckets;
|
||||||
m_size = other.m_size;
|
m_size = other.m_size;
|
||||||
m_capacity = other.m_capacity;
|
m_capacity = other.m_capacity;
|
||||||
|
|
Loading…
Add table
Reference in a new issue