diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-05-22 14:59:29 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-05-22 14:59:29 +0200 |
commit | 794e4948025f108dde3c7d8a4546273d840039ee (patch) | |
tree | 3244ab7e34340cba2dc645fe488f215462b4d4de | |
parent | dd663a7ba41563c82cf68aa5492ed4f2fe875d35 (diff) |
Fix code duplication
-rw-r--r-- | tun_freebsd.go | 5 |
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() |