diff options
Diffstat (limited to 'tun')
-rw-r--r-- | tun/wintun/wintun_windows.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tun/wintun/wintun_windows.go b/tun/wintun/wintun_windows.go index 7327f98..958a309 100644 --- a/tun/wintun/wintun_windows.go +++ b/tun/wintun/wintun_windows.go @@ -190,6 +190,7 @@ func CreateInterface(description string, hwndParent uintptr) (*Wintun, bool, err if err != nil { return nil, false, fmt.Errorf("SetupDiCreateDeviceInfoListEx(%s) failed: %v", guid.ToString(&deviceClassNetGUID), err) } + defer devInfoList.Close() // Get the device class name from GUID. className, err := setupapi.SetupDiClassNameFromGuidEx(&deviceClassNetGUID, machineName) |