aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2017-07-15 15:07:38 -0700
committerGarrett D'Amore <garrett@damore.org>2017-07-15 15:07:38 -0700
commit5fe345c66139fc3242c4fdbd78bf05e5670581e8 (patch)
tree2a3acdf26464eeeedacafa6df894d49b03e02868 /src
parent031f7f441f88379d5359a6e96cdd2fe296052070 (diff)
downloadnng-5fe345c66139fc3242c4fdbd78bf05e5670581e8.tar.gz
nng-5fe345c66139fc3242c4fdbd78bf05e5670581e8.tar.bz2
nng-5fe345c66139fc3242c4fdbd78bf05e5670581e8.zip
Close leaking lock for inproc.
Diffstat (limited to 'src')
-rw-r--r--src/transport/inproc/inproc.c5
1 files changed, 3 insertions, 2 deletions
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 <garrett@damore.org>
+// Copyright 2017 Capitar IT Group BV <info@capitar.com>
//
// 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;
}