aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-08-28 20:03:49 +0200
committerEric Wong <normalperson@yhbt.net>2008-09-01 18:35:18 -0700
commit4184435c697ba953e0a224da5d8f7f4e880c1644 (patch)
treec0c94563e345148567242c8875f713037bd5b129 /src
parenta396943470949bf67065c6a3e3a98540ef4e966b (diff)
downloadmpd-4184435c697ba953e0a224da5d8f7f4e880c1644.tar.gz
mpd-4184435c697ba953e0a224da5d8f7f4e880c1644.tar.xz
mpd-4184435c697ba953e0a224da5d8f7f4e880c1644.zip
client: don't free client resources except in client_close()
All of the client's resources are freed in client_close(). It is enough to set the "expired" flag, no need to duplicate lots of destruction code again and again.
Diffstat (limited to 'src')
-rw-r--r--src/client.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/src/client.c b/src/client.c
index 2dbc9d0fd..3065a6940 100644
--- a/src/client.c
+++ b/src/client.c
@@ -667,14 +667,6 @@ static void client_write_deferred(struct client *client)
/* cause client to close */
DEBUG("client %i: problems flushing buffer\n",
client->num);
- buf = client->deferred_send;
- do {
- struct sllnode *prev = buf;
- buf = buf->next;
- free(prev);
- } while (buf);
- client->deferred_send = NULL;
- client->deferred_bytes = 0;
client->expired = 1;
}
}
@@ -744,13 +736,6 @@ static void client_write_output(struct client *client)
(unsigned long)client_max_output_buffer_size);
/* cause client to close */
client->expired = 1;
- do {
- struct sllnode *prev = buf;
- buf = buf->next;
- free(prev);
- } while (buf);
- client->deferred_send = NULL;
- client->deferred_bytes = 0;
} else {
while (buf->next)
buf = buf->next;