wineoss.drv: Avoid mixer fd leak.
This commit is contained in:
parent
7c1ae27443
commit
063ddfeead
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue