Juan Lang : iphlpapi: Fix a couple of file descriptor leaks.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Dec 13 04:58:25 CST 2005


Module: wine
Branch: refs/heads/master
Commit: 36ac9f86652911b03b4c35dae4d9d32148eca85f
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=36ac9f86652911b03b4c35dae4d9d32148eca85f

Author: Juan Lang <juan_lang at yahoo.com>
Date:   Tue Dec 13 11:11:53 2005 +0100

iphlpapi: Fix a couple of file descriptor leaks.

---

 dlls/iphlpapi/ifenum.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/dlls/iphlpapi/ifenum.c b/dlls/iphlpapi/ifenum.c
index c608cd1..63a66af 100644
--- a/dlls/iphlpapi/ifenum.c
+++ b/dlls/iphlpapi/ifenum.c
@@ -818,6 +818,7 @@ DWORD getInterfaceMtuByName(const char *
 #endif
       ret = NO_ERROR;
     }
+    close(fd);
   }
   else
     ret = ERROR_NO_MORE_FILES;
@@ -858,6 +859,7 @@ DWORD getInterfaceStatusByName(const cha
         *status = MIB_IF_OPER_STATUS_NON_OPERATIONAL;
       ret = NO_ERROR;
     }
+    close(fd);
   }
   else
     ret = ERROR_NO_MORE_FILES;




More information about the wine-cvs mailing list