Matteo Bruni (@Mystral) commented about dlls/d3dx9_36/render.c:
D3DUSAGE_RENDERTARGET, &format, D3DPOOL_DEFAULT); if (FAILED(hr)) return hr;
- render = HeapAlloc(GetProcessHeap(), 0, sizeof(struct render_to_envmap));
- render = malloc(sizeof(struct render_to_envmap));
Might as well use sizeof(*render) while at it.