aboutsummaryrefslogtreecommitdiff
path: root/net/tcpclient.c
diff options
context:
space:
mode:
authorMartin Peach <mrpeach@users.sourceforge.net>2010-03-23 16:13:03 +0000
committerMartin Peach <mrpeach@users.sourceforge.net>2010-03-23 16:13:03 +0000
commitc5a15468f04a020e9b517eb22d63cc85776be00c (patch)
treef91ffcf2288a10a06614978371c2551dcebd4436 /net/tcpclient.c
parent5380a5b7e62aa57289b877d8b67403dda1be5b7b (diff)
Fixed NULL-pointer access bug in tcpserver_free() that caused trouble when closing a [tcpserver].
Free send parameters if thread fails to create. [tcpclient] posts "tcpclient_free" at start and end of tcpclient_free if verbosity==1. svn path=/trunk/externals/mrpeach/; revision=13243
Diffstat (limited to 'net/tcpclient.c')
-rw-r--r--net/tcpclient.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/tcpclient.c b/net/tcpclient.c
index 93fbb91..9804db8 100644
--- a/net/tcpclient.c
+++ b/net/tcpclient.c
@@ -526,9 +526,11 @@ static void *tcpclient_new(t_floatarg udpflag)
static void tcpclient_free(t_tcpclient *x)
{
+ if (x->x_verbosity) post("tcpclient_free...");
tcpclient_disconnect(x);
clock_free(x->x_poll);
clock_free(x->x_clock);
+ if (x->x_verbosity) post("...tcpclient_free");
}
void tcpclient_setup(void)