summaryrefslogtreecommitdiff
path: root/osnet/WindowsEthernetTap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'osnet/WindowsEthernetTap.cpp')
-rw-r--r--osnet/WindowsEthernetTap.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/osnet/WindowsEthernetTap.cpp b/osnet/WindowsEthernetTap.cpp
index 8326597a..0e580643 100644
--- a/osnet/WindowsEthernetTap.cpp
+++ b/osnet/WindowsEthernetTap.cpp
@@ -706,8 +706,9 @@ NET_IFINDEX WindowsEthernetTap::_getDeviceIndex()
for(ULONG i=0;i<ift->NumEntries;++i) {
if (ift->Table[i].InterfaceLuid.Value == _deviceLuid.Value) {
+ NET_IFINDEX idx = ift->Table[i].InterfaceIndex;
FreeMibTable(ift);
- return ift->Table[i].InterfaceIndex;
+ return idx;
}
}