ole32: Fix a leak of the IBindCtx object in FileMonikerImpl_IsEqual.

This commit is contained in:
Rob Shearman 2007-11-10 16:05:42 +00:00 committed by Alexandre Julliard
parent 2249565eb7
commit 3bd222004e
1 changed files with 5 additions and 3 deletions

View File

@ -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;
}
/******************************************************************************