From 9dba3479c89686ca106aeac87f47aa34c0588478 Mon Sep 17 00:00:00 2001 From: Robert Shearman Date: Fri, 28 Jan 2005 17:19:51 +0000 Subject: [PATCH] Release the client security objects when no longer needed (reported by Mike McCormack). --- dlls/ole32/compobj.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c index 06b5c683014..d391ef9ea7a 100644 --- a/dlls/ole32/compobj.c +++ b/dlls/ole32/compobj.c @@ -2593,10 +2593,13 @@ HRESULT WINAPI CoQueryProxyBlanket(IUnknown *pProxy, DWORD *pAuthnSvc, hr = IUnknown_QueryInterface(pProxy, &IID_IClientSecurity, (void **)&pCliSec); if (SUCCEEDED(hr)) + { hr = IClientSecurity_QueryBlanket(pCliSec, pProxy, pAuthnSvc, pAuthzSvc, ppServerPrincName, pAuthnLevel, pImpLevel, ppAuthInfo, pCapabilities); + IClientSecurity_Release(pCliSec); + } if (FAILED(hr)) ERR("-- failed with 0x%08lx\n", hr); return hr; @@ -2635,10 +2638,13 @@ HRESULT WINAPI CoSetProxyBlanket(IUnknown *pProxy, DWORD AuthnSvc, hr = IUnknown_QueryInterface(pProxy, &IID_IClientSecurity, (void **)&pCliSec); if (SUCCEEDED(hr)) + { hr = IClientSecurity_SetBlanket(pCliSec, pProxy, AuthnSvc, AuthzSvc, pServerPrincName, AuthnLevel, ImpLevel, pAuthInfo, Capabilities); + IClientSecurity_Release(pCliSec); + } if (FAILED(hr)) ERR("-- failed with 0x%08lx\n", hr); return hr; @@ -2669,7 +2675,10 @@ HRESULT WINAPI CoCopyProxy(IUnknown *pProxy, IUnknown **ppCopy) hr = IUnknown_QueryInterface(pProxy, &IID_IClientSecurity, (void **)&pCliSec); if (SUCCEEDED(hr)) + { hr = IClientSecurity_CopyProxy(pCliSec, pProxy, ppCopy); + IClientSecurity_Release(pCliSec); + } if (FAILED(hr)) ERR("-- failed with 0x%08lx\n", hr); return hr;