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 | f230add201d4963d97a09dcd9223900711fd1085 (patch) | |
tree | d57a6ec8ff809820fc4996a3f34e89c488bbad63 | |
parent | 0699752495b061ee8ad13e0ea0ee0bfed9e747e7 (diff) |
device: destroy workqueue before freeing queue
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-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)); |