mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-29 12:23:30 +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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user