mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-06-26 04:13:13 +03:00
Fix leaks and add test
This commit is contained in:
@@ -162,9 +162,8 @@ func (w *WireGuard) Start() error {
|
||||
}
|
||||
|
||||
func (w *WireGuard) Close() error {
|
||||
return common.Close(
|
||||
w.tunDevice,
|
||||
common.PtrOrNil(w.device),
|
||||
common.PtrOrNil(w.bind),
|
||||
)
|
||||
if w.device != nil {
|
||||
w.device.Close()
|
||||
}
|
||||
return common.Close(w.tunDevice)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user