aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/wireguard.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wireguard.c b/src/wireguard.c
index c830d10..4131b00 100644
--- a/src/wireguard.c
+++ b/src/wireguard.c
@@ -359,7 +359,7 @@ wg_peer_clean(struct wg_peer *peer)
peer->p_ks_session = NULL;
peer->p_ks_session_old = NULL;
- rw_enter_write(&peer->p_lock);
+ rw_exit_write(&peer->p_lock);
if (hs != NULL)
wg_session_drop(hs);