mirror of
https://github.com/reactos/reactos.git
synced 2025-04-28 01:11:35 +00:00
[NTOSKRNL]
Fix freeing of the driver string, this should only be done, if the lowest bit is set. svn path=/trunk/; revision=60965
This commit is contained in:
parent
3e75f29597
commit
c6ee3e16ef
1 changed files with 10 additions and 1 deletions
|
@ -3214,11 +3214,20 @@ LoaderScan:
|
|||
&LoadedImports);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
BOOLEAN NeedToFreeString = FALSE;
|
||||
|
||||
/* If the lowest bit is set to 1, this is a hint that we need to free */
|
||||
if (*(ULONG_PTR*)MissingDriverName & 1)
|
||||
{
|
||||
NeedToFreeString = TRUE;
|
||||
*(ULONG_PTR*)MissingDriverName &= ~1;
|
||||
}
|
||||
|
||||
DPRINT1("MiResolveImageReferences failed with status 0x%x\n", Status);
|
||||
DPRINT1(" Missing driver '%ws', missing API '%s'\n",
|
||||
MissingDriverName, MissingApiName);
|
||||
|
||||
if (MissingDriverName != NULL)
|
||||
if (NeedToFreeString)
|
||||
{
|
||||
ExFreePoolWithTag(MissingDriverName, TAG_LDR_WSTR);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue