OSDN Git Service
(root)
/
winmerge-jp
/
winmerge-jp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
72fda57
)
FileOrFolderSelect.cpp: Use CoTaskMemFree() instead of IMalloc::Free()
author
sdottaka
<sdottaka@users.sourceforge.net>
Sun, 24 May 2015 08:49:28 +0000
(17:49 +0900)
committer
sdottaka
<sdottaka@users.sourceforge.net>
Sun, 24 May 2015 08:49:28 +0000
(17:49 +0900)
--HG--
branch : stable
Src/FileOrFolderSelect.cpp
patch
|
blob
|
history
diff --git
a/Src/FileOrFolderSelect.cpp
b/Src/FileOrFolderSelect.cpp
index
8dd1163
..
a62f1b9
100644
(file)
--- a/
Src/FileOrFolderSelect.cpp
+++ b/
Src/FileOrFolderSelect.cpp
@@
-136,7
+136,6
@@
BOOL SelectFolder(String& path, LPCTSTR root_path /*=NULL*/,
HWND hwndOwner /*=NULL*/)
{
BROWSEINFO bi;
- LPMALLOC pMalloc;
LPITEMIDLIST pidl;
TCHAR szPath[MAX_PATH] = {0};
BOOL bRet = FALSE;
@@
-155,7
+154,6
@@
BOOL SelectFolder(String& path, LPCTSTR root_path /*=NULL*/,
bi.lParam = (LPARAM)root_path;
pidl = SHBrowseForFolder(&bi);
-
if (pidl)
{
if (SHGetPathFromIDList(pidl, szPath))
@@
-163,10
+161,7
@@
BOOL SelectFolder(String& path, LPCTSTR root_path /*=NULL*/,
path = szPath;
bRet = TRUE;
}
-
- SHGetMalloc(&pMalloc);
- pMalloc->Free(pidl);
- pMalloc->Release();
+ CoTaskMemFree(pidl);
}
return bRet;
}