- It's possible for MmAllocatePagesForMdlEx() not to satisfy the
full allocation request, but not fail. Thus AllocatePage() should
check that the completed allocation actually matches what it
asks for.
- RegistryCreateKey() has a memory leak.
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
*Key = Child;
+ __RegistryFree(Buffer);
+
return STATUS_SUCCESS;
fail4:
SkipBytes,
TotalBytes,
MmCached,
- 0);
+ MM_DONT_ZERO_ALLOCATION);
status = STATUS_NO_MEMORY;
if (Mdl == NULL)
goto fail1;
+ if (Mdl->ByteCount < PAGE_SIZE)
+ goto fail2;
+
ASSERT((Mdl->MdlFlags & (MDL_MAPPED_TO_SYSTEM_VA |
MDL_PARTIAL_HAS_BEEN_MAPPED |
MDL_PARTIAL |
status = STATUS_UNSUCCESSFUL;
if (MdlMappedSystemVa == NULL)
- goto fail2;
+ goto fail3;
ASSERT3P(MdlMappedSystemVa, ==, Mdl->MappedSystemVa);
return Mdl;
+fail3:
+ Error("fail3\n");
+
fail2:
Error("fail2\n");