From 39fc8553162dac7635a0e8d0970d64b09c801ee2 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Tue, 28 Apr 2015 20:30:55 +0200 Subject: [PATCH] d3d10core: Release the wined3d query in d3d10_query_Release() (Valgrind). --- dlls/d3d10core/async.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/dlls/d3d10core/async.c b/dlls/d3d10core/async.c index d6c3d81b0d3..f6886a76dab 100644 --- a/dlls/d3d10core/async.c +++ b/dlls/d3d10core/async.c @@ -66,16 +66,17 @@ static ULONG STDMETHODCALLTYPE d3d10_query_AddRef(ID3D10Query *iface) static ULONG STDMETHODCALLTYPE d3d10_query_Release(ID3D10Query *iface) { - struct d3d10_query *This = impl_from_ID3D10Query(iface); - ULONG refcount = InterlockedDecrement(&This->refcount); + struct d3d10_query *query = impl_from_ID3D10Query(iface); + 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) { - ID3D10Device1_Release(This->device); - wined3d_private_store_cleanup(&This->private_store); - HeapFree(GetProcessHeap(), 0, This); + ID3D10Device1_Release(query->device); + wined3d_query_decref(query->wined3d_query); + wined3d_private_store_cleanup(&query->private_store); + HeapFree(GetProcessHeap(), 0, query); } return refcount;