mirror of
https://github.com/reactos/reactos.git
synced 2025-04-25 16:10:29 +00:00
- Fix allocation of CM_RESOURCE_LIST
- Might fix bug 4354 See issue #4354 for more details. svn path=/trunk/; revision=40694
This commit is contained in:
parent
018ceb886d
commit
53767e20b1
1 changed files with 5 additions and 3 deletions
|
@ -340,9 +340,11 @@ IntVideoPortPnPStartDevice(
|
|||
|
||||
/* Save the resource list */
|
||||
ResourceCount = AllocatedResources->List[0].PartialResourceList.Count;
|
||||
ResourceListSize =
|
||||
FIELD_OFFSET(CM_RESOURCE_LIST, List[0].PartialResourceList.
|
||||
PartialDescriptors[ResourceCount]);
|
||||
ResourceListSize = sizeof(CM_RESOURCE_LIST);
|
||||
|
||||
if (ResourceCount > 1)
|
||||
ResourceListSize += (ResourceCount-1) * sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR);
|
||||
|
||||
DeviceExtension->AllocatedResources = ExAllocatePool(PagedPool, ResourceListSize);
|
||||
if (DeviceExtension->AllocatedResources == NULL)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue