winmm: Fix 8KB leak when mmioOpen fails (Valgrind).

This commit is contained in:
Jörg Höhle 2011-05-11 21:58:43 +02:00 committed by Alexandre Julliard
parent 733d1763d3
commit 7df286c136
1 changed files with 2 additions and 0 deletions

View File

@ -679,6 +679,8 @@ static HMMIO MMIO_Open(LPSTR szFileName, MMIOINFO* refmminfo, DWORD dwOpenFlags,
if (refmminfo->wErrorRet == 0)
return wm->info.hmmio;
error1:
if (wm->info.dwFlags & MMIO_ALLOCBUF)
HeapFree(GetProcessHeap(), 0, wm->info.pchBuffer);
if (wm->ioProc) wm->ioProc->count--;
error2:
MMIO_Destroy(wm);