ole32: Allocate a small temp variable on the stack instead of the heap.
This commit is contained in:
parent
ef104dc465
commit
620ca68d01
|
@ -2530,19 +2530,17 @@ HRESULT WINAPI OleCreate(
|
||||||
if (SUCCEEDED(hres2))
|
if (SUCCEEDED(hres2))
|
||||||
{
|
{
|
||||||
DWORD dwConnection;
|
DWORD dwConnection;
|
||||||
FORMATETC *pfe;
|
|
||||||
if (renderopt == OLERENDER_DRAW && !pFormatEtc) {
|
if (renderopt == OLERENDER_DRAW && !pFormatEtc) {
|
||||||
pfe = HeapAlloc(GetProcessHeap(), 0, sizeof(FORMATETC));
|
FORMATETC pfe;
|
||||||
pfe->cfFormat = 0;
|
pfe.cfFormat = 0;
|
||||||
pfe->ptd = NULL;
|
pfe.ptd = NULL;
|
||||||
pfe->dwAspect = DVASPECT_CONTENT;
|
pfe.dwAspect = DVASPECT_CONTENT;
|
||||||
pfe->lindex = -1;
|
pfe.lindex = -1;
|
||||||
pfe->tymed = TYMED_NULL;
|
pfe.tymed = TYMED_NULL;
|
||||||
}else
|
hres = IOleCache_Cache(pOleCache, &pfe, ADVF_PRIMEFIRST, &dwConnection);
|
||||||
pfe = pFormatEtc;
|
}
|
||||||
hres = IOleCache_Cache(pOleCache, pfe, ADVF_PRIMEFIRST, &dwConnection);
|
else
|
||||||
if (!pFormatEtc && pfe)
|
hres = IOleCache_Cache(pOleCache, pFormatEtc, ADVF_PRIMEFIRST, &dwConnection);
|
||||||
HeapFree(GetProcessHeap(), 0, pfe);
|
|
||||||
IOleCache_Release(pOleCache);
|
IOleCache_Release(pOleCache);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue