From 794e4948025f108dde3c7d8a4546273d840039ee Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Tue, 22 May 2018 14:59:29 +0200 Subject: [PATCH] Fix code duplication --- tun_freebsd.go | 5 ----- 1 file changed, 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()