mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-30 05:31:39 +00:00
mciwave: Use matching memory allocator (Coverity).
*pszTmpFileName will be freed with free() but it's allocated with HeapAlloc().
This commit is contained in:
parent
c93440b700
commit
eeb1826c3f
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue