]> git.ipfire.org Git - thirdparty/wireguard-go.git/commit
device: do not attach finalizer to non-returned object
authorJason A. Donenfeld <Jason@zx2c4.com>
Tue, 9 Feb 2021 14:09:50 +0000 (15:09 +0100)
committerJason A. Donenfeld <Jason@zx2c4.com>
Tue, 9 Feb 2021 14:37:04 +0000 (15:37 +0100)
commit6ac1240821207c90708ac205f4f98eb8b82f3ee5
tree1331654d522170b1942bfcd1741bcc3b6fb40672
parent4b5d15ec2b1f148b4f718ed16d7e7f022b19fe1b
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>
device/channels.go
device/peer.go
device/pools_test.go
device/receive.go
device/send.go