diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-07-15 15:07:38 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-07-15 15:07:38 -0700 |
| commit | 5fe345c66139fc3242c4fdbd78bf05e5670581e8 (patch) | |
| tree | 2a3acdf26464eeeedacafa6df894d49b03e02868 | |
| parent | 031f7f441f88379d5359a6e96cdd2fe296052070 (diff) | |
| download | nng-5fe345c66139fc3242c4fdbd78bf05e5670581e8.tar.gz nng-5fe345c66139fc3242c4fdbd78bf05e5670581e8.tar.bz2 nng-5fe345c66139fc3242c4fdbd78bf05e5670581e8.zip | |
Close leaking lock for inproc.
| -rw-r--r-- | src/transport/inproc/inproc.c | 5 |
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; } |
