From 7eb7471b35dd0e5b9e2da0668376af5b218264e6 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Wed, 4 Jan 2017 12:47:26 -0800 Subject: TCP listen and accept test. There is an occasional use-after-free bug we need to fix still. --- src/transport/tcp/tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/transport') diff --git a/src/transport/tcp/tcp.c b/src/transport/tcp/tcp.c index 8cd91044..00d9a2f3 100644 --- a/src/transport/tcp/tcp.c +++ b/src/transport/tcp/tcp.c @@ -401,7 +401,7 @@ nni_tcp_ep_accept(void *arg, void **pipep) int rv; - if ((pipe = NNI_ALLOC_STRUCT(pipe)) != NULL) { + if ((pipe = NNI_ALLOC_STRUCT(pipe)) == NULL) { return (NNG_ENOMEM); } pipe->proto = ep->proto; -- cgit v1.2.3-70-g09d2