aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/noise.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-10-08 22:54:32 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-10-09 01:57:47 +0200
commitf985de2c5acc9a9086829d52237fce0d2a663277 (patch)
tree28ce187bcd7aad1e03ab92f7ec9695d343f44973 /src/noise.c
parentmain: change module description (diff)
downloadwireguard-monolithic-historical-f985de2c5acc9a9086829d52237fce0d2a663277.tar.xz
wireguard-monolithic-historical-f985de2c5acc9a9086829d52237fce0d2a663277.zip
global: give if statements brackets and other cleanups
Diffstat (limited to 'src/noise.c')
-rw-r--r--src/noise.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/noise.c b/src/noise.c
index 0de09fb..098c060 100644
--- a/src/noise.c
+++ b/src/noise.c
@@ -777,8 +777,9 @@ bool wg_noise_handshake_begin_session(struct noise_handshake *handshake,
ret = wg_index_hashtable_replace(
&handshake->entry.peer->device->index_hashtable,
&handshake->entry, &new_keypair->entry);
- } else
+ } else {
kzfree(new_keypair);
+ }
rcu_read_unlock_bh();
out: