Sebastian Lackner : shell32: Use the correct memory allocation function in RecycleBin_GetDisplayNameOf.
Alexandre Julliard
julliard at winehq.org
Wed Aug 24 12:05:17 CDT 2016
Module: wine
Branch: master
Commit: a11fb74ffb15b60768c6fa49b07251639a6611a6
URL: http://source.winehq.org/git/wine.git/?a=commit;h=a11fb74ffb15b60768c6fa49b07251639a6611a6
Author: Sebastian Lackner <sebastian at fds-team.de>
Date: Tue Aug 23 18:33:00 2016 +0200
shell32: Use the correct memory allocation function in RecycleBin_GetDisplayNameOf.
Signed-off-by: Sebastian Lackner <sebastian at fds-team.de>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/shell32/recyclebin.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/dlls/shell32/recyclebin.c b/dlls/shell32/recyclebin.c
index 28098af..0b5638b 100644
--- a/dlls/shell32/recyclebin.c
+++ b/dlls/shell32/recyclebin.c
@@ -529,11 +529,7 @@ static HRESULT WINAPI RecycleBin_GetDisplayNameOf(IShellFolder2 *This, LPCITEMID
TRACE("(%p, %p, %x, %p)\n", This, pidl, uFlags, pName);
TRASH_UnpackItemID(&pidl->mkid, &data);
pName->uType = STRRET_WSTR;
- pName->u.pOleStr = StrDupW(PathFindFileNameW(data.cFileName));
- if (pName->u.pOleStr == NULL)
- return E_OUTOFMEMORY;
-
- return S_OK;
+ return SHStrDupW(PathFindFileNameW(data.cFileName), &pName->u.pOleStr);
}
static HRESULT WINAPI RecycleBin_SetNameOf(IShellFolder2 *This, HWND hwnd, LPCITEMIDLIST pidl, LPCOLESTR pszName,
More information about the wine-cvs
mailing list