From d1c4871012d537f1a1568261c6e661c9c646b358 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Sun, 9 Feb 2014 17:56:38 +0400 Subject: [PATCH] ole32: Use CoTaskMemAlloc() instead of IMalloc directly. --- dlls/ole32/compobj.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c index 3e99097d571..2160cba37bb 100644 --- a/dlls/ole32/compobj.c +++ b/dlls/ole32/compobj.c @@ -2215,11 +2215,7 @@ HRESULT WINAPI CLSIDFromString(LPCOLESTR idstr, LPCLSID id ) */ HRESULT WINAPI StringFromCLSID(REFCLSID id, LPOLESTR *idstr) { - HRESULT ret; - LPMALLOC mllc; - - if ((ret = CoGetMalloc(0,&mllc))) return ret; - if (!(*idstr = IMalloc_Alloc( mllc, CHARS_IN_GUID * sizeof(WCHAR) ))) return E_OUTOFMEMORY; + if (!(*idstr = CoTaskMemAlloc(CHARS_IN_GUID * sizeof(WCHAR)))) return E_OUTOFMEMORY; StringFromGUID2( id, *idstr, CHARS_IN_GUID ); return S_OK; }