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

Alexandre Julliard julliard at wine.codeweavers.com
Wed Apr 29 09:22:18 CDT 2015


Module: wine
Branch: master
Commit: 39fc8553162dac7635a0e8d0970d64b09c801ee2
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=39fc8553162dac7635a0e8d0970d64b09c801ee2

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Tue Apr 28 20:30:55 2015 +0200

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 d6c3d81..f6886a7 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;




More information about the wine-cvs mailing list