wineoss.drv: Avoid mixer fd leak.

This commit is contained in:
Marcus Meissner 2009-09-04 22:39:58 +02:00 committed by Alexandre Julliard
parent 7c1ae27443
commit 063ddfeead
1 changed files with 2 additions and 0 deletions

View File

@ -147,6 +147,7 @@ static DWORD AUX_GetVolume(WORD wDevID, LPDWORD lpdwVol)
}
if (ioctl(mixer, cmd, &volume) == -1) {
WARN("unable to read mixer !\n");
close(mixer);
return MMSYSERR_NOTENABLED;
}
close(mixer);
@ -208,6 +209,7 @@ static DWORD AUX_SetVolume(WORD wDevID, DWORD dwParam)
}
if (ioctl(mixer, cmd, &volume) == -1) {
WARN("unable to set mixer !\n");
close(mixer);
return MMSYSERR_NOTENABLED;
}
close(mixer);