summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom <tomut@yahoo.com>2020-09-27 08:14:37 -0600
committerAndreas Kling <kling@serenityos.org>2020-09-27 19:46:04 +0200
commit079486ed7eba3d15567bb5ee9677c81dd190cffa (patch)
tree62e1e6c5512d5b36362026daae161755d7643d90
parent0f5214447790afa11907f57a2dcac70cb64655a7 (diff)
downloadserenity-079486ed7eba3d15567bb5ee9677c81dd190cffa.zip
AK: Clear previous/next link in InlineLinkList::remove
-rw-r--r--AK/InlineLinkedList.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/AK/InlineLinkedList.h b/AK/InlineLinkedList.h
index d40634e838..6f1a9b4fff 100644
--- a/AK/InlineLinkedList.h
+++ b/AK/InlineLinkedList.h
@@ -217,6 +217,9 @@ inline void InlineLinkedList<T>::remove(T* node)
ASSERT(node == m_tail);
m_tail = node->prev();
}
+
+ node->set_next(0);
+ node->set_prev(0);
}
template<typename T>