Commit 063ddfee authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

wineoss.drv: Avoid mixer fd leak.

parent 7c1ae274
...@@ -147,6 +147,7 @@ static DWORD AUX_GetVolume(WORD wDevID, LPDWORD lpdwVol) ...@@ -147,6 +147,7 @@ static DWORD AUX_GetVolume(WORD wDevID, LPDWORD lpdwVol)
} }
if (ioctl(mixer, cmd, &volume) == -1) { if (ioctl(mixer, cmd, &volume) == -1) {
WARN("unable to read mixer !\n"); WARN("unable to read mixer !\n");
close(mixer);
return MMSYSERR_NOTENABLED; return MMSYSERR_NOTENABLED;
} }
close(mixer); close(mixer);
...@@ -208,6 +209,7 @@ static DWORD AUX_SetVolume(WORD wDevID, DWORD dwParam) ...@@ -208,6 +209,7 @@ static DWORD AUX_SetVolume(WORD wDevID, DWORD dwParam)
} }
if (ioctl(mixer, cmd, &volume) == -1) { if (ioctl(mixer, cmd, &volume) == -1) {
WARN("unable to set mixer !\n"); WARN("unable to set mixer !\n");
close(mixer);
return MMSYSERR_NOTENABLED; return MMSYSERR_NOTENABLED;
} }
close(mixer); close(mixer);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment