Author: dquintana
Date: Tue Aug 19 22:30:12 2014
New Revision: 63907
URL:
http://svn.reactos.org/svn/reactos?rev=63907&view=rev
Log:
[SHELL32]
* Giannis found another similar case of double-releasing.
Modified:
branches/shell-experiments/dll/win32/shell32/folders/fs.cpp
Modified: branches/shell-experiments/dll/win32/shell32/folders/fs.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/she…
==============================================================================
--- branches/shell-experiments/dll/win32/shell32/folders/fs.cpp [iso-8859-1] (original)
+++ branches/shell-experiments/dll/win32/shell32/folders/fs.cpp [iso-8859-1] Tue Aug 19
22:30:12 2014
@@ -1058,7 +1058,7 @@
HRESULT WINAPI CFSFolder::CopyItems(IShellFolder * pSFFrom, UINT cidl,
LPCITEMIDLIST * apidl, bool bCopy)
{
- IPersistFolder2 *ppf2 = NULL;
+ CComPtr<IPersistFolder2> ppf2 = NULL;
WCHAR szSrcPath[MAX_PATH];
WCHAR szTargetPath[MAX_PATH];
SHFILEOPSTRUCTW op;
@@ -1076,10 +1076,8 @@
hr = ppf2->GetCurFolder(&pidl);
if (FAILED(hr))
{
- ppf2->Release();
return hr;
}
- ppf2->Release();
hr = pSFFrom->GetDisplayNameOf(pidl, SHGDN_FORPARSING, &strRet);
if (FAILED(hr))
@@ -1113,7 +1111,6 @@
HeapFree(GetProcessHeap(), 0, pszTargetList);
SHFree(pidl);
- ppf2->Release();
return E_OUTOFMEMORY;
}