[PATCH] Remove potential reference count races
max at mtew.isa-geek.net
max at mtew.isa-geek.net
Sat Oct 27 20:59:33 CDT 2012
From: Max TenEyck Woodbury <max at mtew.isa-geek.net>
---
dlls/shlwapi/thread.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/shlwapi/thread.c b/dlls/shlwapi/thread.c
index eb2c35d..43e0433 100644
--- a/dlls/shlwapi/thread.c
+++ b/dlls/shlwapi/thread.c
@@ -157,7 +157,7 @@ static ULONG WINAPI threadref_AddRef(IUnknown *iface)
threadref * This = impl_from_IUnknown(iface);
TRACE("(%p)\n", This);
- return InterlockedIncrement(This->ref);
+ return InterlockedIncrement(&This->ref);
}
static ULONG WINAPI threadref_Release(IUnknown *iface)
@@ -167,7 +167,7 @@ static ULONG WINAPI threadref_Release(IUnknown *iface)
TRACE("(%p)\n", This);
- refcount = InterlockedDecrement(This->ref);
+ refcount = InterlockedDecrement(&This->ref);
if (!refcount)
HeapFree(GetProcessHeap(), 0, This);
--
1.7.7.6
More information about the wine-patches
mailing list