Commit 29212d8a authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

avifil32: Use CoTaskMemAlloc when allocating memory to return through

an OLE interface.
parent 610fc08e
......@@ -704,7 +704,7 @@ static HRESULT WINAPI IPersistFile_fnGetCurFile(IPersistFile *iface,
if (This->paf->szFileName != NULL) {
int len = lstrlenW(This->paf->szFileName) + 1;
*ppszFileName = (LPOLESTR)GlobalAllocPtr(GHND, len * sizeof(WCHAR));
*ppszFileName = CoTaskMemAlloc(len * sizeof(WCHAR));
if (*ppszFileName == NULL)
return AVIERR_MEMORY;
......
......@@ -662,7 +662,7 @@ static HRESULT WINAPI IPersistFile_fnGetCurFile(IPersistFile *iface,
if (This->paf->szFileName != NULL) {
int len = lstrlenW(This->paf->szFileName) + 1;
*ppszFileName = GlobalAllocPtr(GHND, len * sizeof(WCHAR));
*ppszFileName = CoTaskMemAlloc(len * sizeof(WCHAR));
if (*ppszFileName == NULL)
return AVIERR_MEMORY;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment