Author: dgorbachev
Date: Sat Dec 12 21:53:23 2009
New Revision: 44556
URL:
http://svn.reactos.org/svn/reactos?rev=44556&view=rev
Log:
Patch for LdrFixupImports() by Alexander Yastrebov, bug #4954.
Modified:
trunk/reactos/dll/ntdll/ldr/utils.c
Modified: trunk/reactos/dll/ntdll/ldr/utils.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/ldr/utils.c?rev=…
==============================================================================
--- trunk/reactos/dll/ntdll/ldr/utils.c [iso-8859-1] (original)
+++ trunk/reactos/dll/ntdll/ldr/utils.c [iso-8859-1] Sat Dec 12 21:53:23 2009
@@ -2063,24 +2063,25 @@
}
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)