no need to FreeLibrary handle returned by GetModuleHandle
This commit is contained in:
parent
1affc51534
commit
171f2e021e
|
@ -1354,6 +1354,10 @@ static int sigar_remote_proc_env_get(sigar_t *sigar, sigar_pid_t pid,
|
|||
LPVOID addr;
|
||||
int status;
|
||||
|
||||
/*
|
||||
* Do not FreeLibrary(kdll), see:
|
||||
* http://msdn2.microsoft.com/en-us/library/ms683199.aspx
|
||||
*/
|
||||
if (!(kdll = GetModuleHandle("msvcrt.dll"))) {
|
||||
return GetLastError();
|
||||
}
|
||||
|
@ -1370,8 +1374,6 @@ static int sigar_remote_proc_env_get(sigar_t *sigar, sigar_pid_t pid,
|
|||
return GetLastError();
|
||||
}
|
||||
|
||||
/* FIXME: close the kdll handles */
|
||||
|
||||
if (!(proc = OpenProcess(MAXIMUM_ALLOWED, 0, (DWORD)pid))) {
|
||||
return GetLastError();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue