From b7e0ff598ad72fa6c48afa0beeae211aad60164f Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 23 Sep 2020 19:51:43 +0000 Subject: [PATCH] wgengine: don't close tundev in NewUserspaceEngine. newUserspaceEngineAdvanced closes the tun device on error already. Fixes #783. Signed-off-by: David Anderson --- wgengine/userspace.go | 1 - 1 file changed, 1 deletion(-) diff --git a/wgengine/userspace.go b/wgengine/userspace.go index 72cfe3044..17e109a5c 100644 --- a/wgengine/userspace.go +++ b/wgengine/userspace.go @@ -188,7 +188,6 @@ func NewUserspaceEngine(logf logger.Logf, tunname string, listenPort uint16) (En e, err := NewUserspaceEngineAdvanced(conf) if err != nil { - tun.Close() return nil, err } return e, err