avifil32: Use CoTaskMemAlloc when allocating memory to return through

an OLE interface.
This commit is contained in:
Mike McCormack 2006-03-11 00:21:30 +09:00 committed by Alexandre Julliard
parent 610fc08e8d
commit 29212d8afd
2 changed files with 2 additions and 2 deletions

View File

@ -704,7 +704,7 @@ static HRESULT WINAPI IPersistFile_fnGetCurFile(IPersistFile *iface,
if (This->paf->szFileName != NULL) { if (This->paf->szFileName != NULL) {
int len = lstrlenW(This->paf->szFileName) + 1; int len = lstrlenW(This->paf->szFileName) + 1;
*ppszFileName = (LPOLESTR)GlobalAllocPtr(GHND, len * sizeof(WCHAR)); *ppszFileName = CoTaskMemAlloc(len * sizeof(WCHAR));
if (*ppszFileName == NULL) if (*ppszFileName == NULL)
return AVIERR_MEMORY; return AVIERR_MEMORY;

View File

@ -662,7 +662,7 @@ static HRESULT WINAPI IPersistFile_fnGetCurFile(IPersistFile *iface,
if (This->paf->szFileName != NULL) { if (This->paf->szFileName != NULL) {
int len = lstrlenW(This->paf->szFileName) + 1; int len = lstrlenW(This->paf->szFileName) + 1;
*ppszFileName = GlobalAllocPtr(GHND, len * sizeof(WCHAR)); *ppszFileName = CoTaskMemAlloc(len * sizeof(WCHAR));
if (*ppszFileName == NULL) if (*ppszFileName == NULL)
return AVIERR_MEMORY; return AVIERR_MEMORY;