aboutsummaryrefslogtreecommitdiffstats
path: root/src/ClientList.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/ClientList.cxx')
-rw-r--r--src/ClientList.cxx12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/ClientList.cxx b/src/ClientList.cxx
index 37e6f1289..101802479 100644
--- a/src/ClientList.cxx
+++ b/src/ClientList.cxx
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003-2013 The Music Player Daemon Project
+ * Copyright (C) 2003-2014 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
@@ -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);
}