[PATCH] wineoss.drv: avoid mixer fd leak
Marcus Meissner
marcus at jet.franken.de
Fri Sep 4 15:39:58 CDT 2009
---
dlls/wineoss.drv/mmaux.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/dlls/wineoss.drv/mmaux.c b/dlls/wineoss.drv/mmaux.c
index c41c1da..403edd0 100644
--- a/dlls/wineoss.drv/mmaux.c
+++ b/dlls/wineoss.drv/mmaux.c
@@ -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);
--
1.5.6
More information about the wine-patches
mailing list