diff --git a/sys/dev/if_wg/module/wg_noise.c b/sys/dev/if_wg/module/wg_noise.c index 946a570916a6..0fa7664e66d5 100644 --- a/sys/dev/if_wg/module/wg_noise.c +++ b/sys/dev/if_wg/module/wg_noise.c @@ -454,7 +454,7 @@ noise_remote_begin_session(struct noise_remote *r) NOISE_SYMMETRIC_SIZE, NOISE_SYMMETRIC_SIZE, 0, 0, hs->hs_ck); } else { - rw_exit_write(&r->r_keypair_lock); + rw_exit_write(&r->r_handshake_lock); return EINVAL; }