shell32: Use the correct memory allocation function in RecycleBin_GetDisplayNameOf.

Sebastian Lackner sebastian at fds-team.de
Tue Aug 23 11:33:00 CDT 2016


Signed-off-by: Sebastian Lackner <sebastian at fds-team.de>
---
 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,
-- 
2.9.0



More information about the wine-patches mailing list