diff --git a/lib/isc/netmgr/netmgr.c b/lib/isc/netmgr/netmgr.c index 9e4b692f80..35469b6dff 100644 --- a/lib/isc/netmgr/netmgr.c +++ b/lib/isc/netmgr/netmgr.c @@ -1156,6 +1156,8 @@ isc_nmhandle_unref(isc_nmhandle_t *handle) { if (isc_refcount_decrement(&handle->references) > 1) { return; } + /* We need an acquire memory barrier here */ + (void)isc_refcount_current(&handle->references); sock = handle->sock; handle->sock = NULL;