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);