mirror of
https://github.com/reactos/reactos.git
synced 2024-07-12 07:35:10 +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
|
@ -3214,11 +3214,20 @@ LoaderScan:
|
||||||
&LoadedImports);
|
&LoadedImports);
|
||||||
if (!NT_SUCCESS(Status))
|
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("MiResolveImageReferences failed with status 0x%x\n", Status);
|
||||||
DPRINT1(" Missing driver '%ws', missing API '%s'\n",
|
DPRINT1(" Missing driver '%ws', missing API '%s'\n",
|
||||||
MissingDriverName, MissingApiName);
|
MissingDriverName, MissingApiName);
|
||||||
|
|
||||||
if (MissingDriverName != NULL)
|
if (NeedToFreeString)
|
||||||
{
|
{
|
||||||
ExFreePoolWithTag(MissingDriverName, TAG_LDR_WSTR);
|
ExFreePoolWithTag(MissingDriverName, TAG_LDR_WSTR);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue