summaryrefslogtreecommitdiffhomepage
path: root/tun_freebsd.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-05-22 14:59:29 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-05-22 14:59:29 +0200
commit794e4948025f108dde3c7d8a4546273d840039ee (patch)
tree3244ab7e34340cba2dc645fe488f215462b4d4de /tun_freebsd.go
parentdd663a7ba41563c82cf68aa5492ed4f2fe875d35 (diff)
Fix code duplication
Diffstat (limited to 'tun_freebsd.go')
-rw-r--r--tun_freebsd.go5
1 files changed, 0 insertions, 5 deletions
diff --git a/tun_freebsd.go b/tun_freebsd.go
index f738c7f..80d5909 100644
--- a/tun_freebsd.go
+++ b/tun_freebsd.go
@@ -340,11 +340,6 @@ func CreateTUNFromFile(file *os.File) (TUNDevice, error) {
return nil, err
}
- if err != nil {
- tun.fd.Close()
- return nil, err
- }
-
tun.rwcancel, err = rwcancel.NewRWCancel(int(file.Fd()))
if err != nil {
tun.fd.Close()