From c8cf0c1ce9cf1b38b302ae4a2a6fa798fef85f08 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 14 Jun 2004 18:38:50 +0000 Subject: a bunch of fixes git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@10 fefdeb5f-60dc-0310-8127-8f9354f1896f --- src/protocol-simple.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/protocol-simple.c') diff --git a/src/protocol-simple.c b/src/protocol-simple.c index 3335bc14..e930f9ae 100644 --- a/src/protocol-simple.c +++ b/src/protocol-simple.c @@ -103,7 +103,10 @@ static void on_connection(struct socket_server*s, struct iochannel *io, void *us c->istream = NULL; c->ostream = NULL; c->protocol = p; - + + c->client = client_new(p->core, "SIMPLE", "Client"); + assert(c->client); + if (p->mode & PROTOCOL_SIMPLE_RECORD) { struct source *source; @@ -128,8 +131,6 @@ static void on_connection(struct socket_server*s, struct iochannel *io, void *us assert(c->istream); } - c->client = client_new(p->core, "SIMPLE", "Client"); - assert(c->client); iochannel_set_callback(c->io, io_callback, c); idxset_put(p->connections, c, NULL); @@ -137,6 +138,8 @@ static void on_connection(struct socket_server*s, struct iochannel *io, void *us fail: if (c) { + if (c->client) + client_free(c->client); if (c->istream) input_stream_free(c->istream); if (c->ostream) -- cgit