From 3fb40d4792ba2f7b681d636957cf76d721084a0e Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Tue, 10 Apr 2018 14:52:07 -0700 Subject: 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. --- src/core/aio.c | 4 ++-- 1 file 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; -- cgit v1.2.3-70-g09d2