aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-07-31 07:09:20 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-07-31 07:19:52 +0200
commit4f9c782f195bff9a9318eeef98445ea67090fca6 (patch)
treec8dc9b2f08a752e24721cf81f0f274e06e2e4ef0 /src
parentpeer: simplify rcu reference counts (diff)
downloadwireguard-monolithic-historical-4f9c782f195bff9a9318eeef98445ea67090fca6.tar.xz
wireguard-monolithic-historical-4f9c782f195bff9a9318eeef98445ea67090fca6.zip
send: address of variable is never null
Reported-by: Jann Horn <jann@thejh.net>
Diffstat (limited to 'src')
-rw-r--r--src/send.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/send.c b/src/send.c
index 90dab85..823b344 100644
--- a/src/send.c
+++ b/src/send.c
@@ -303,7 +303,7 @@ void packet_send_staged_packets(struct wireguard_peer *peer)
if (unlikely(!keypair))
goto out_nokey;
key = &keypair->sending;
- if (unlikely(!key || !key->is_valid))
+ if (unlikely(!key->is_valid))
goto out_nokey;
if (unlikely(has_expired(key->birthdate, REJECT_AFTER_TIME)))
goto out_invalid;