[PATCH 4/4] Fix interface leak (Valgrind)
Nikolay Sivov
nsivov at codeweavers.com
Tue Jan 18 13:45:03 CST 2011
---
dlls/shell32/shfldr_fs.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/dlls/shell32/shfldr_fs.c b/dlls/shell32/shfldr_fs.c
index 084dffd..c0e9ae5 100644
--- a/dlls/shell32/shfldr_fs.c
+++ b/dlls/shell32/shfldr_fs.c
@@ -314,8 +314,7 @@ LPITEMIDLIST SHELL32_CreatePidlFromBindCtx(IBindCtx *pbc, LPCWSTR path)
'B','i','n','d',' ','D','a','t','a',0 };
IFileSystemBindData *fsbd = NULL;
LPITEMIDLIST pidl = NULL;
- IUnknown *param = NULL;
- WIN32_FIND_DATAW wfd;
+ IUnknown *unk = NULL;
HRESULT r;
TRACE("%p %s\n", pbc, debugstr_w(path));
@@ -324,14 +323,15 @@ LPITEMIDLIST SHELL32_CreatePidlFromBindCtx(IBindCtx *pbc, LPCWSTR path)
return NULL;
/* see if the caller bound File System Bind Data */
- r = IBindCtx_GetObjectParam( pbc, szfsbc, ¶m );
+ r = IBindCtx_GetObjectParam( pbc, szfsbc, &unk );
if (FAILED(r))
return NULL;
- r = IUnknown_QueryInterface( param, &IID_IFileSystemBindData,
- (LPVOID*) &fsbd );
+ r = IUnknown_QueryInterface( unk, &IID_IFileSystemBindData, (void**)&fsbd );
if (SUCCEEDED(r))
{
+ WIN32_FIND_DATAW wfd;
+
r = IFileSystemBindData_GetFindData( fsbd, &wfd );
if (SUCCEEDED(r))
{
@@ -340,6 +340,7 @@ LPITEMIDLIST SHELL32_CreatePidlFromBindCtx(IBindCtx *pbc, LPCWSTR path)
}
IFileSystemBindData_Release( fsbd );
}
+ IUnknown_Release( unk );
return pidl;
}
--
1.5.6.5
--------------050203070608070804020709--
More information about the wine-patches
mailing list