From 3bd222004ed975ab35509109eb36bfdd5385854e Mon Sep 17 00:00:00 2001 From: Rob Shearman Date: Sat, 10 Nov 2007 16:05:42 +0000 Subject: [PATCH] ole32: Fix a leak of the IBindCtx object in FileMonikerImpl_IsEqual. --- dlls/ole32/filemoniker.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dlls/ole32/filemoniker.c b/dlls/ole32/filemoniker.c index cc8eae9ed90..8702d0fe28a 100644 --- a/dlls/ole32/filemoniker.c +++ b/dlls/ole32/filemoniker.c @@ -793,13 +793,15 @@ FileMonikerImpl_IsEqual(IMoniker* iface,IMoniker* pmkOtherMoniker) res = CreateBindCtx(0,&bind); if (FAILED(res)) return res; + res = S_FALSE; if (SUCCEEDED(IMoniker_GetDisplayName(pmkOtherMoniker,bind,NULL,&filePath))) { - int result = lstrcmpiW(filePath, This->filePathName); + if (!lstrcmpiW(filePath, This->filePathName)) + res = S_OK; CoTaskMemFree(filePath); - if ( result == 0 ) return S_OK; } - return S_FALSE; + IBindCtx_Release(bind); + return res; } /******************************************************************************