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