Commit 260e11c4416334d538389cb50bcd70fcb8592290

Authored by root
1 parent dd9931c7

Fixed closing PE file

Showing 1 changed file with 1 additions and 0 deletions
winver.py
... ... @@ -26,6 +26,7 @@ def getWindowsVersion(path):
26 26 version = ""
27 27 pe = pefile.PE(getWindowsDirectory(path) + "/System32/ntdll.dll")
28 28 version = str(pe.FileInfo[0].StringTable[0].entries[b'ProductVersion'],'utf-8')
  29 + pe.close()
29 30 if re.match("(3|4)\.",version) != None:
30 31 return _WIN_NT
31 32 elif re.match("5\.0", version) != None:
... ...