Marcus Meissner : wineoss.drv: Avoid mixer fd leak.

Alexandre Julliard julliard at winehq.org
Tue Sep 8 08:54:08 CDT 2009


Module: wine
Branch: master
Commit: 063ddfeead661d789e049008e76d830f50ca1d07
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=063ddfeead661d789e049008e76d830f50ca1d07

Author: Marcus Meissner <marcus at jet.franken.de>
Date:   Fri Sep  4 22:39:58 2009 +0200

wineoss.drv: Avoid mixer fd leak.

---

 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..de5ecea 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);




More information about the wine-cvs mailing list