Commit 620ca68d authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

ole32: Allocate a small temp variable on the stack instead of the heap.

parent ef104dc4
......@@ -2530,19 +2530,17 @@ HRESULT WINAPI OleCreate(
if (SUCCEEDED(hres2))
{
DWORD dwConnection;
FORMATETC *pfe;
if (renderopt == OLERENDER_DRAW && !pFormatEtc) {
pfe = HeapAlloc(GetProcessHeap(), 0, sizeof(FORMATETC));
pfe->cfFormat = 0;
pfe->ptd = NULL;
pfe->dwAspect = DVASPECT_CONTENT;
pfe->lindex = -1;
pfe->tymed = TYMED_NULL;
}else
pfe = pFormatEtc;
hres = IOleCache_Cache(pOleCache, pfe, ADVF_PRIMEFIRST, &dwConnection);
if (!pFormatEtc && pfe)
HeapFree(GetProcessHeap(), 0, pfe);
FORMATETC pfe;
pfe.cfFormat = 0;
pfe.ptd = NULL;
pfe.dwAspect = DVASPECT_CONTENT;
pfe.lindex = -1;
pfe.tymed = TYMED_NULL;
hres = IOleCache_Cache(pOleCache, &pfe, ADVF_PRIMEFIRST, &dwConnection);
}
else
hres = IOleCache_Cache(pOleCache, pFormatEtc, ADVF_PRIMEFIRST, &dwConnection);
IOleCache_Release(pOleCache);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment