From 5fe345c66139fc3242c4fdbd78bf05e5670581e8 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sat, 15 Jul 2017 15:07:38 -0700 Subject: Close leaking lock for inproc. --- src/transport/inproc/inproc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/transport/inproc/inproc.c b/src/transport/inproc/inproc.c index 330c1d13..3d13e684 100644 --- a/src/transport/inproc/inproc.c +++ b/src/transport/inproc/inproc.c @@ -1,5 +1,6 @@ // // Copyright 2017 Garrett D'Amore +// Copyright 2017 Capitar IT Group BV // // This software is supplied under the terms of the MIT License, a // copy of which should be located in the distribution where this @@ -480,13 +481,13 @@ nni_inproc_ep_accept(void *arg, nni_aio *aio) // We are already on the master list of servers, thanks to bind. if (ep->closed) { - // This is the only possible error path from the - // time we acquired the lock. nni_inproc_conn_finish(aio, NNG_ECLOSED); + nni_mtx_unlock(&nni_inproc.mx); return; } if (!ep->started) { nni_inproc_conn_finish(aio, NNG_ESTATE); + nni_mtx_unlock(&nni_inproc.mx); return; } -- cgit v1.2.3-70-g09d2