[PATCH] winmm: return error on NULL ioProc (Coverity)

Marcus Meissner marcus at jet.franken.de
Sat Oct 17 10:29:48 CDT 2009


Hi,

checking ioproc for NULL does not help if you dereference it later.

Ciao, Marcus
---
 dlls/winmm/mmio.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/winmm/mmio.c b/dlls/winmm/mmio.c
index 7c5a64d..b774003 100644
--- a/dlls/winmm/mmio.c
+++ b/dlls/winmm/mmio.c
@@ -345,8 +345,8 @@ static LRESULT	send_message(struct IOProcList* ioProc, LPMMIOINFO mmioinfo,
     LPARAM		lp1 = lParam1, lp2 = lParam2;
 
     if (!ioProc) {
-	ERR("brrr\n");
-	result = MMSYSERR_INVALPARAM;
+	ERR("ioProc NULL\n");
+	return MMSYSERR_INVALPARAM;
     }
 
     if (ioProc->is_unicode != is_unicode) {
-- 
1.5.6



More information about the wine-patches mailing list