aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-07-18 17:31:04 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-07-18 17:31:04 +0200
commite863f4061630fa9bc06f625d6c63ce0366a73f83 (patch)
tree093315214499135be40cbad24fcccd0ee3c85f0a /src
parentwg-quick: allow link local default gateway (diff)
downloadwireguard-monolithic-historical-e863f4061630fa9bc06f625d6c63ce0366a73f83.tar.xz
wireguard-monolithic-historical-e863f4061630fa9bc06f625d6c63ce0366a73f83.zip
device: destroy workqueue before freeing queue
Diffstat (limited to 'src')
-rw-r--r--src/device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/device.c b/src/device.c
index 89944ca..54a94fb 100644
--- a/src/device.c
+++ b/src/device.c
@@ -226,9 +226,9 @@ static void destruct(struct net_device *dev)
peer_remove_all(wg); /* The final references are cleared in the below calls to destroy_workqueue. */
destroy_workqueue(wg->handshake_receive_wq);
destroy_workqueue(wg->handshake_send_wq);
+ destroy_workqueue(wg->packet_crypt_wq);
packet_queue_free(&wg->decrypt_queue, true);
packet_queue_free(&wg->encrypt_queue, true);
- destroy_workqueue(wg->packet_crypt_wq);
rcu_barrier_bh(); /* Wait for all the peers to be actually freed. */
ratelimiter_uninit();
memzero_explicit(&wg->static_identity, sizeof(struct noise_static_identity));