Commit eeb1826c authored by Zhiyi Zhang's avatar Zhiyi Zhang Committed by Alexandre Julliard

mciwave: Use matching memory allocator (Coverity).

*pszTmpFileName will be freed with free() but it's allocated with HeapAlloc().
parent c93440b7
......@@ -432,9 +432,7 @@ static DWORD create_tmp_file(HMMIO* hFile, LPWSTR* pszTmpFileName)
return MCIERR_FILE_NOT_FOUND;
}
*pszTmpFileName = HeapAlloc(GetProcessHeap(),
HEAP_ZERO_MEMORY,
MAX_PATH * sizeof(WCHAR));
*pszTmpFileName = calloc(1, MAX_PATH * sizeof(WCHAR));
if (!GetTempFileNameW(szTmpPath, szPrefix, 0, *pszTmpFileName)) {
WARN("can't retrieve temp file name!\n");
free(*pszTmpFileName);
......
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