iphlpapi: Fix a couple of file descriptor leaks.
This commit is contained in:
parent
a6e27ea9c0
commit
36ac9f8665
|
@ -818,6 +818,7 @@ DWORD getInterfaceMtuByName(const char *name, PDWORD mtu)
|
|||
#endif
|
||||
ret = NO_ERROR;
|
||||
}
|
||||
close(fd);
|
||||
}
|
||||
else
|
||||
ret = ERROR_NO_MORE_FILES;
|
||||
|
@ -858,6 +859,7 @@ DWORD getInterfaceStatusByName(const char *name, PDWORD status)
|
|||
*status = MIB_IF_OPER_STATUS_NON_OPERATIONAL;
|
||||
ret = NO_ERROR;
|
||||
}
|
||||
close(fd);
|
||||
}
|
||||
else
|
||||
ret = ERROR_NO_MORE_FILES;
|
||||
|
|
Loading…
Reference in New Issue