diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-07-18 17:31:04 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-07-18 17:31:04 +0200 |
commit | e863f4061630fa9bc06f625d6c63ce0366a73f83 (patch) | |
tree | 093315214499135be40cbad24fcccd0ee3c85f0a | |
parent | wg-quick: allow link local default gateway (diff) | |
download | wireguard-monolithic-historical-e863f4061630fa9bc06f625d6c63ce0366a73f83.tar.xz wireguard-monolithic-historical-e863f4061630fa9bc06f625d6c63ce0366a73f83.zip |
device: destroy workqueue before freeing queue
-rw-r--r-- | src/device.c | 2 |
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)); |