]> git.ipfire.org Git - thirdparty/wireguard-go.git/commitdiff
wintun: keep original error when Wintun session start fails
authorSimon Rozman <simon@rozman.si>
Wed, 25 Nov 2020 11:37:02 +0000 (12:37 +0100)
committerJason A. Donenfeld <Jason@zx2c4.com>
Wed, 25 Nov 2020 12:57:05 +0000 (13:57 +0100)
Signed-off-by: Simon Rozman <simon@rozman.si>
tun/tun_windows.go

index e949c05abe17c24fc59578e8bf2e92b89ece8710..a132d068f5d9187629d5556ad993c2c6581a3481 100644 (file)
@@ -104,7 +104,7 @@ func CreateTUNWithRequestedGUID(ifname string, requestedGUID *windows.GUID, mtu
 
        tun.session, err = wt.StartSession(0x800000) // Ring capacity, 8 MiB
        if err != nil {
-               _, err = tun.wt.Delete(false)
+               tun.wt.Delete(false)
                close(tun.events)
                return nil, fmt.Errorf("Error starting session: %w", err)
        }