From 8479229ae80bb74270ca7400e37d0efe8f3857e3 Mon Sep 17 00:00:00 2001 From: Alex Henrie Date: Sat, 27 Dec 2014 23:35:16 -0700 Subject: [PATCH] dpvoice: Decrement reference count in Release functions. --- dlls/dpvoice/client.c | 4 ++-- dlls/dpvoice/server.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dlls/dpvoice/client.c b/dlls/dpvoice/client.c index 0fab0c56d6f..29b53363d1a 100644 --- a/dlls/dpvoice/client.c +++ b/dlls/dpvoice/client.c @@ -83,7 +83,7 @@ static ULONG WINAPI dpvclient_AddRef(IDirectPlayVoiceClient *iface) static ULONG WINAPI dpvclient_Release(IDirectPlayVoiceClient *iface) { IDirectPlayVoiceClientImpl *This = impl_from_IDirectPlayVoiceClient(iface); - ULONG ref = InterlockedIncrement(&This->ref); + ULONG ref = InterlockedDecrement(&This->ref); TRACE("(%p) ref=%u\n", This, ref); @@ -270,7 +270,7 @@ static ULONG WINAPI dpvtest_AddRef(IDirectPlayVoiceTest *iface) static ULONG WINAPI dpvtest_Release(IDirectPlayVoiceTest *iface) { IDirectPlayVoiceTestImpl *This = impl_from_IDirectPlayVoiceTest(iface); - ULONG ref = InterlockedIncrement(&This->ref); + ULONG ref = InterlockedDecrement(&This->ref); TRACE("(%p) ref=%u\n", This, ref); diff --git a/dlls/dpvoice/server.c b/dlls/dpvoice/server.c index eb2c9ed7b1e..e9291e2d2b5 100644 --- a/dlls/dpvoice/server.c +++ b/dlls/dpvoice/server.c @@ -68,10 +68,11 @@ static ULONG WINAPI dpvserver_AddRef(IDirectPlayVoiceServer *iface) return ref; } + static ULONG WINAPI dpvserver_Release(IDirectPlayVoiceServer *iface) { IDirectPlayVoiceServerImpl *This = impl_from_IDirectPlayVoiceServer(iface); - ULONG ref = InterlockedIncrement(&This->ref); + ULONG ref = InterlockedDecrement(&This->ref); TRACE("(%p) ref=%u\n", This, ref);