wined3d: Free the adapter's format info in IWineD3DImpl_Release() (Valgrind).
This commit is contained in:
parent
f2aaca2f67
commit
42eb516d96
|
@ -334,6 +334,12 @@ long WineD3DAdapterChangeGLRam(IWineD3DDeviceImpl *D3DDevice, long glram)
|
|||
return adapter->UsedTextureRam;
|
||||
}
|
||||
|
||||
static void wined3d_adapter_cleanup(struct wined3d_adapter *adapter)
|
||||
{
|
||||
HeapFree(GetProcessHeap(), 0, adapter->gl_info.gl_formats);
|
||||
HeapFree(GetProcessHeap(), 0, adapter->cfgs);
|
||||
}
|
||||
|
||||
/**********************************************************
|
||||
* IUnknown parts follows
|
||||
**********************************************************/
|
||||
|
@ -372,7 +378,7 @@ static ULONG WINAPI IWineD3DImpl_Release(IWineD3D *iface) {
|
|||
|
||||
for (i = 0; i < This->adapter_count; ++i)
|
||||
{
|
||||
HeapFree(GetProcessHeap(), 0, This->adapters[i].cfgs);
|
||||
wined3d_adapter_cleanup(&This->adapters[i]);
|
||||
}
|
||||
HeapFree(GetProcessHeap(), 0, This);
|
||||
}
|
||||
|
|
|
@ -1112,6 +1112,7 @@ BOOL initPixelFormatsNoGL(struct wined3d_gl_info *gl_info)
|
|||
if (!init_format_compression_info(gl_info))
|
||||
{
|
||||
HeapFree(GetProcessHeap(), 0, gl_info->gl_formats);
|
||||
gl_info->gl_formats = NULL;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -1135,6 +1136,7 @@ BOOL initPixelFormats(struct wined3d_gl_info *gl_info)
|
|||
|
||||
fail:
|
||||
HeapFree(GetProcessHeap(), 0, gl_info->gl_formats);
|
||||
gl_info->gl_formats = NULL;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue