mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 14:53:40 +00:00
[INCLUDE] Use HeapAlloc/HeapFree in layout.h
CORE-17341
This commit is contained in:
parent
de8d156e2c
commit
89bd2d12da
1 changed files with 5 additions and 5 deletions
|
@ -193,7 +193,7 @@ static __inline LAYOUT_DATA *
|
||||||
LayoutInit(HWND hwndParent, const LAYOUT_INFO *pLayouts, UINT cLayouts)
|
LayoutInit(HWND hwndParent, const LAYOUT_INFO *pLayouts, UINT cLayouts)
|
||||||
{
|
{
|
||||||
SIZE_T cb;
|
SIZE_T cb;
|
||||||
LAYOUT_DATA *pData = (LAYOUT_DATA *)SHAlloc(sizeof(LAYOUT_DATA));
|
LAYOUT_DATA *pData = (LAYOUT_DATA *)HeapAlloc(GetProcessHeap(), 0, sizeof(LAYOUT_DATA));
|
||||||
if (pData == NULL)
|
if (pData == NULL)
|
||||||
{
|
{
|
||||||
assert(0);
|
assert(0);
|
||||||
|
@ -202,11 +202,11 @@ LayoutInit(HWND hwndParent, const LAYOUT_INFO *pLayouts, UINT cLayouts)
|
||||||
|
|
||||||
cb = cLayouts * sizeof(LAYOUT_INFO);
|
cb = cLayouts * sizeof(LAYOUT_INFO);
|
||||||
pData->m_cLayouts = cLayouts;
|
pData->m_cLayouts = cLayouts;
|
||||||
pData->m_pLayouts = (LAYOUT_INFO *)SHAlloc(cb);
|
pData->m_pLayouts = (LAYOUT_INFO *)HeapAlloc(GetProcessHeap(), 0, cb);
|
||||||
if (pData->m_pLayouts == NULL)
|
if (pData->m_pLayouts == NULL)
|
||||||
{
|
{
|
||||||
assert(0);
|
assert(0);
|
||||||
SHFree(pData);
|
HeapFree(GetProcessHeap(), 0, pData);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
memcpy(pData->m_pLayouts, pLayouts, cb);
|
memcpy(pData->m_pLayouts, pLayouts, cb);
|
||||||
|
@ -227,6 +227,6 @@ LayoutDestroy(LAYOUT_DATA *pData)
|
||||||
{
|
{
|
||||||
if (!pData)
|
if (!pData)
|
||||||
return;
|
return;
|
||||||
SHFree(pData->m_pLayouts);
|
HeapFree(GetProcessHeap(), 0, pData->m_pLayouts);
|
||||||
SHFree(pData);
|
HeapFree(GetProcessHeap(), 0, pData);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue