mirror of
https://github.com/reactos/reactos.git
synced 2025-04-25 16:10:29 +00:00
- Don't load a module with the same name more than once.
svn path=/trunk/; revision=27083
This commit is contained in:
parent
e619b8cca2
commit
8ef4afc835
1 changed files with 8 additions and 0 deletions
|
@ -596,6 +596,14 @@ FrLdrMapImage(IN FILE *Image,
|
|||
ULONG ImageSize;
|
||||
NTSTATUS Status = STATUS_SUCCESS;
|
||||
|
||||
/* Try to see, maybe it's loaded already */
|
||||
if (LdrGetModuleObject(Name) != NULL)
|
||||
{
|
||||
/* It's loaded, return NULL. It would be wise to return
|
||||
correct LoadBase, but it seems to be ignored almost everywhere */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Set the virtual (image) and physical (load) addresses */
|
||||
LoadBase = (PVOID)NextModuleBase;
|
||||
ImageBase = RVA(LoadBase , -KERNEL_BASE_PHYS + KSEG0_BASE);
|
||||
|
|
Loading…
Reference in a new issue