mirror of
https://github.com/reactos/reactos.git
synced 2025-04-25 16:10:29 +00:00
Patch for LdrFixupImports() by Alexander Yastrebov, bug #4954.
svn path=/trunk/; revision=44556
This commit is contained in:
parent
a9c37bad74
commit
d65cf93246
1 changed files with 5 additions and 4 deletions
|
@ -2063,24 +2063,25 @@ Success:
|
|||
}
|
||||
ImportModuleDirectoryCurrent++;
|
||||
}
|
||||
if(!NT_SUCCESS(Status))
|
||||
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
NTSTATUS errorStatus = Status;
|
||||
|
||||
while(ImportModuleDirectoryCurrent-- >= ImportModuleDirectory)
|
||||
while (ImportModuleDirectoryCurrent >= ImportModuleDirectory)
|
||||
{
|
||||
ImportedName = (PCHAR)Module->DllBase + ImportModuleDirectoryCurrent->Name;
|
||||
|
||||
Status = LdrpGetOrLoadModule(NULL, ImportedName, &ImportedModule, FALSE);
|
||||
if(NT_SUCCESS(Status) && Module != ImportedModule)
|
||||
if (NT_SUCCESS(Status) && Module != ImportedModule)
|
||||
{
|
||||
Status = LdrpUnloadModule(ImportedModule, FALSE);
|
||||
if (!NT_SUCCESS(Status)) DPRINT1("unable to unload %s\n", ImportedName);
|
||||
}
|
||||
ImportModuleDirectoryCurrent--;
|
||||
}
|
||||
return errorStatus;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (TlsDirectory && TlsSize > 0)
|
||||
|
|
Loading…
Reference in a new issue