summaryrefslogtreecommitdiffhomepage
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
commitf230add201d4963d97a09dcd9223900711fd1085 (patch)
treed57a6ec8ff809820fc4996a3f34e89c488bbad63
parent0699752495b061ee8ad13e0ea0ee0bfed9e747e7 (diff)
device: destroy workqueue before freeing queue
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-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));