aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/send.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-09-16 15:32:42 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2017-09-16 15:33:18 +0200
commite7e92404695c0b3b0e3e44305679ac11a904a69a (patch)
tree80b26d9784fbb16a05c3b539eba238bf280690ac /src/send.c
parenttimers: style (diff)
downloadwireguard-linux-compat-e7e92404695c0b3b0e3e44305679ac11a904a69a.tar.xz
wireguard-linux-compat-e7e92404695c0b3b0e3e44305679ac11a904a69a.zip
send: no need to check for NULL since ref is valid
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/send.c')
-rw-r--r--src/send.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/send.c b/src/send.c
index 3a3e544..6390efd 100644
--- a/src/send.c
+++ b/src/send.c
@@ -55,9 +55,6 @@ void packet_queue_handshake_initiation(struct wireguard_peer *peer, bool is_retr
return;
peer = peer_rcu_get(peer);
- if (unlikely(!peer))
- return;
-
/* Queues up calling packet_send_queued_handshakes(peer), where we do a peer_put(peer) after: */
if (!queue_work(peer->device->peer_wq, &peer->transmit_handshake_work))
peer_put(peer); /* If the work was already queued, we want to drop the extra reference */