summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2018-04-10 14:52:07 -0700
committerGarrett D'Amore <garrett@damore.org>2018-04-10 15:40:06 -0700
commit3fb40d4792ba2f7b681d636957cf76d721084a0e (patch)
tree71a3493cdcb16eafda59ec987a3d9fd7ec2e8a85
parentde29422db2c023301336e49f1e54610c743328b1 (diff)
downloadnng-3fb40d4792ba2f7b681d636957cf76d721084a0e.tar.gz
nng-3fb40d4792ba2f7b681d636957cf76d721084a0e.tar.bz2
nng-3fb40d4792ba2f7b681d636957cf76d721084a0e.zip
Fix valgrind warning in assert.
This technically doesn't need the lock, as we're only trying to catch a possible problem during development rather than in the field (and this should never occur), but the false positive in valgrind obscures other possible errors, so leave it in the lock.
-rw-r--r--src/core/aio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/aio.c b/src/core/aio.c
index 3027b0c1..fac62f12 100644
--- a/src/core/aio.c
+++ b/src/core/aio.c
@@ -369,10 +369,10 @@ static void
nni_aio_finish_impl(
nni_aio *aio, int rv, size_t count, nni_msg *msg, bool synch)
{
- NNI_ASSERT(!aio->a_pend); // provider only calls us *once*
-
nni_mtx_lock(&nni_aio_lk);
+ NNI_ASSERT(!aio->a_pend); // provider only calls us *once*
+
nni_list_node_remove(&aio->a_expire_node);
aio->a_pend = true;