[PORTCLS]

* Fix a bug in PcNewResourceSublist which led to memory corruption.

svn path=/trunk/; revision=55007
This commit is contained in:
Amine Khaldi 2012-01-18 23:34:26 +00:00
parent d2ce0487ef
commit 284faf3581

View file

@ -427,7 +427,7 @@ PcNewResourceSublist(
#endif #endif
/* Allocate resource list */ /* Allocate resource list */
NewList->m_TranslatedResourceList = (PCM_RESOURCE_LIST)AllocateItem(PoolType, sizeof(CM_RESOURCE_LIST), TAG_PORTCLASS); NewList->m_TranslatedResourceList = (PCM_RESOURCE_LIST)AllocateItem(PoolType, ResourceSize, TAG_PORTCLASS);
if (!NewList->m_TranslatedResourceList) if (!NewList->m_TranslatedResourceList)
{ {
/* No memory */ /* No memory */
@ -436,7 +436,7 @@ PcNewResourceSublist(
} }
/* Allocate resource list */ /* Allocate resource list */
NewList->m_UntranslatedResourceList = (PCM_RESOURCE_LIST)AllocateItem(PoolType, sizeof(CM_RESOURCE_LIST), TAG_PORTCLASS); NewList->m_UntranslatedResourceList = (PCM_RESOURCE_LIST)AllocateItem(PoolType, ResourceSize, TAG_PORTCLASS);
if (!NewList->m_UntranslatedResourceList) if (!NewList->m_UntranslatedResourceList)
{ {
/* No memory */ /* No memory */