summaryrefslogtreecommitdiffhomepage
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
commit9db4e539d8af772d9586934ea23faedefa77fab5 (patch)
treee6a7d7126d5e7cead30d5edf85b75952f142b4e3
parent488b7dcba7a5dcf5d65349992c7fc32b3d9c17d1 (diff)
send: address of variable is never null
Reported-by: Jann Horn <jann@thejh.net> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-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;