aboutsummaryrefslogtreecommitdiffstats
path: root/device/pools_test.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2021-02-09 15:09:50 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2021-02-09 15:37:04 +0100
commit6ac1240821207c90708ac205f4f98eb8b82f3ee5 (patch)
tree1331654d522170b1942bfcd1741bcc3b6fb40672 /device/pools_test.go
parentdevice: lock elem in autodraining queue before freeing (diff)
downloadwireguard-go-6ac1240821207c90708ac205f4f98eb8b82f3ee5.tar.xz
wireguard-go-6ac1240821207c90708ac205f4f98eb8b82f3ee5.zip
device: do not attach finalizer to non-returned object
Before, the code attached a finalizer to an object that wasn't returned, resulting in immediate garbage collection. Instead return the actual pointer. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'device/pools_test.go')
-rw-r--r--device/pools_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/device/pools_test.go b/device/pools_test.go
index 6caf7e7..a27ccc0 100644
--- a/device/pools_test.go
+++ b/device/pools_test.go
@@ -80,4 +80,4 @@ func BenchmarkWaitPool(b *testing.B) {
}()
}
wg.Wait()
-} \ No newline at end of file
+}