diff options
| author | Garrett D'Amore <garrett@damore.org> | 2021-07-01 12:43:17 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-01 12:43:17 -0700 |
| commit | f9fa485df941c9336c49fa5be4f9346754218128 (patch) | |
| tree | f00ae3d04a81a0497d43b5f7d67535904b32912c /src/core/socket.c | |
| parent | 2a841afb2601e8bc8e2127cb196d64fd5d6fa8a9 (diff) | |
| download | nng-f9fa485df941c9336c49fa5be4f9346754218128.tar.gz nng-f9fa485df941c9336c49fa5be4f9346754218128.tar.bz2 nng-f9fa485df941c9336c49fa5be4f9346754218128.zip | |
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.
Diffstat (limited to 'src/core/socket.c')
| -rw-r--r-- | src/core/socket.c | 4 |
1 files changed, 1 insertions, 3 deletions
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); |
