Commit acbdd807 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Don't leak memory in IWineD3DPixelShaderImpl_GenerateShader().

This fixes a regression introduced by commit 0bf32b12.
parent f1f62fb5
......@@ -275,13 +275,18 @@ static void pshader_set_limits(
static inline GLuint IWineD3DPixelShaderImpl_GenerateShader(
IWineD3DPixelShaderImpl *This) {
SHADER_BUFFER buffer;
GLuint shader;
buffer.buffer = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, SHADER_PGMSIZE);
buffer.bsize = 0;
buffer.lineNo = 0;
buffer.newline = TRUE;
return ((IWineD3DDeviceImpl *)This->baseShader.device)->shader_backend->shader_generate_pshader((IWineD3DPixelShader *) This, &buffer);
shader = ((IWineD3DDeviceImpl *)This->baseShader.device)->shader_backend->shader_generate_pshader((IWineD3DPixelShader *)This, &buffer);
HeapFree(GetProcessHeap(), 0, buffer.buffer);
return shader;
}
static HRESULT WINAPI IWineD3DPixelShaderImpl_SetFunction(IWineD3DPixelShader *iface, CONST DWORD *pFunction) {
......
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