[PATCH] dsound: do not test undefined behaviour (Coverity)

Marcus Meissner marcus at jet.franken.de
Thu May 9 06:08:45 CDT 2013


As is clear from the conditions in ok(), this behaviour is undefined.
So don't test it then...

 714024 Double free

Ciao, Marcus
---
 dlls/dsound/tests/dsound.c |    6 ------
 1 file changed, 6 deletions(-)

diff --git a/dlls/dsound/tests/dsound.c b/dlls/dsound/tests/dsound.c
index ed17f2a..4291e7a 100644
--- a/dlls/dsound/tests/dsound.c
+++ b/dlls/dsound/tests/dsound.c
@@ -1578,12 +1578,6 @@ START_TEST(dsound)
 
         ret = FreeLibrary(hDsound);
         ok( ret, "FreeLibrary(1) returned %d\n", GetLastError());
-        SetLastError(0xdeadbeef);
-        ret = FreeLibrary(hDsound);
-        ok( ret ||
-            broken(!ret && GetLastError() == ERROR_MOD_NOT_FOUND), /* NT4 */
-            "FreeLibrary(2) returned %d\n", GetLastError());
-        ok(!FreeLibrary(hDsound), "DirectSound DLL still loaded\n");
     }
 
     hDsound = LoadLibrary("dsound.dll");
-- 
1.7.10.4




More information about the wine-patches mailing list