From f9fa485df941c9336c49fa5be4f9346754218128 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Thu, 1 Jul 2021 12:43:17 -0700 Subject: fixes #1456 bad access in OSX thread on nn (#1457) * fixes #1456 bad access in OSX thread on nn * Fix broken aio in darwin cloud. --- src/core/socket.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/core/socket.c') diff --git a/src/core/socket.c b/src/core/socket.c index 82267287..90a99c20 100644 --- a/src/core/socket.c +++ b/src/core/socket.c @@ -519,13 +519,11 @@ sock_destroy(nni_sock *s) s->s_sock_ops.sock_fini(s->s_data); } + nni_mtx_lock(&s->s_mx); while ((sopt = nni_list_first(&s->s_options)) != NULL) { nni_list_remove(&s->s_options, sopt); nni_free_opt(sopt); } - - // This exists to silence a false positive in helgrind. - nni_mtx_lock(&s->s_mx); nni_mtx_unlock(&s->s_mx); nni_msgq_fini(s->s_urq); -- cgit v1.2.3-70-g09d2