iphlpapi: Fix a couple of file descriptor leaks.

This commit is contained in:
Juan Lang 2005-12-13 11:11:53 +01:00 committed by Alexandre Julliard
parent a6e27ea9c0
commit 36ac9f8665
1 changed files with 2 additions and 0 deletions

View File

@ -818,6 +818,7 @@ DWORD getInterfaceMtuByName(const char *name, PDWORD mtu)
#endif #endif
ret = NO_ERROR; ret = NO_ERROR;
} }
close(fd);
} }
else else
ret = ERROR_NO_MORE_FILES; ret = ERROR_NO_MORE_FILES;
@ -858,6 +859,7 @@ DWORD getInterfaceStatusByName(const char *name, PDWORD status)
*status = MIB_IF_OPER_STATUS_NON_OPERATIONAL; *status = MIB_IF_OPER_STATUS_NON_OPERATIONAL;
ret = NO_ERROR; ret = NO_ERROR;
} }
close(fd);
} }
else else
ret = ERROR_NO_MORE_FILES; ret = ERROR_NO_MORE_FILES;