aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Dunwoodie <ncon@mail.noconroy.net>2019-10-02 02:59:04 +0100
committerMatt Dunwoodie <ncon@mail.noconroy.net>2019-10-02 03:57:12 +0100
commit79a7ea1408bbefc27c68e09b2cb3316a69f8ade5 (patch)
tree7c326b64ba8dd31822bbdd71fed7d791338d1424
parentRemove refcnt from fixedmap (diff)
downloadwireguard-openbsd-79a7ea1408bbefc27c68e09b2cb3316a69f8ade5.tar.xz
wireguard-openbsd-79a7ea1408bbefc27c68e09b2cb3316a69f8ade5.zip
Fix lock bug in wg_peer clean
-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);