Module: wine Branch: master Commit: 7df286c13604e1add2f6da574921a8c5bc1ad94e URL: http://source.winehq.org/git/wine.git/?a=commit;h=7df286c13604e1add2f6da5749...
Author: Jörg Höhle hoehle@users.sourceforge.net Date: Wed May 11 21:58:43 2011 +0200
winmm: Fix 8KB leak when mmioOpen fails (Valgrind).
---
dlls/winmm/mmio.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/dlls/winmm/mmio.c b/dlls/winmm/mmio.c index 6ac295e..aff150a 100644 --- a/dlls/winmm/mmio.c +++ b/dlls/winmm/mmio.c @@ -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);