aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/ClientList.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/ClientList.cxx b/src/ClientList.cxx
index 37e6f1289..c530ff54a 100644
--- a/src/ClientList.cxx
+++ b/src/ClientList.cxx
@@ -40,8 +40,14 @@ ClientList::Remove(Client &client)
void
ClientList::CloseAll()
{
- while (!list.empty())
- list.front()->Close();
+ while (!list.empty()) {
+ delete list.front();
+ list.pop_front();
+
+#ifndef NDEBUG
+ --size;
+#endif
+ }
assert(size == 0);
}