Commit 39fc8553 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

d3d10core: Release the wined3d query in d3d10_query_Release() (Valgrind).

parent 0a121076
...@@ -66,16 +66,17 @@ static ULONG STDMETHODCALLTYPE d3d10_query_AddRef(ID3D10Query *iface) ...@@ -66,16 +66,17 @@ static ULONG STDMETHODCALLTYPE d3d10_query_AddRef(ID3D10Query *iface)
static ULONG STDMETHODCALLTYPE d3d10_query_Release(ID3D10Query *iface) static ULONG STDMETHODCALLTYPE d3d10_query_Release(ID3D10Query *iface)
{ {
struct d3d10_query *This = impl_from_ID3D10Query(iface); struct d3d10_query *query = impl_from_ID3D10Query(iface);
ULONG refcount = InterlockedDecrement(&This->refcount); ULONG refcount = InterlockedDecrement(&query->refcount);
TRACE("%p decreasing refcount to %u.\n", This, refcount); TRACE("%p decreasing refcount to %u.\n", query, refcount);
if (!refcount) if (!refcount)
{ {
ID3D10Device1_Release(This->device); ID3D10Device1_Release(query->device);
wined3d_private_store_cleanup(&This->private_store); wined3d_query_decref(query->wined3d_query);
HeapFree(GetProcessHeap(), 0, This); wined3d_private_store_cleanup(&query->private_store);
HeapFree(GetProcessHeap(), 0, query);
} }
return refcount; return refcount;
......
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