mirror of
https://git.zx2c4.com/wireguard-go
synced 2024-11-15 01:05:15 +01:00
conn: windows: reset ring to starting position after free
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
75526d6071
commit
5f6bbe4ae8
@ -197,6 +197,9 @@ func (ring *ringBuffer) CloseAndZero() {
|
|||||||
windows.VirtualFree(ring.packets, 0, windows.MEM_RELEASE)
|
windows.VirtualFree(ring.packets, 0, windows.MEM_RELEASE)
|
||||||
ring.packets = 0
|
ring.packets = 0
|
||||||
}
|
}
|
||||||
|
ring.head = 0
|
||||||
|
ring.tail = 0
|
||||||
|
ring.isFull = false
|
||||||
}
|
}
|
||||||
|
|
||||||
func (bind *afWinRingBind) CloseAndZero() {
|
func (bind *afWinRingBind) CloseAndZero() {
|
||||||
|
Loading…
Reference in New Issue
Block a user