[PATCH] initialize shader to NULL

Marcus Meissner marcus at jet.franken.de
Tue Oct 2 12:23:20 CDT 2007


Coverity spotted we have an exit path where we
might release a uninitialized "shader".  I agree.

Ciao, Marcus
---
 dlls/d3d9/tests/device.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c
index 328813c..2402a97 100644
--- a/dlls/d3d9/tests/device.c
+++ b/dlls/d3d9/tests/device.c
@@ -1375,7 +1375,7 @@ static void test_null_stream(void)
     IDirect3D9 *d3d9;
     HWND hwnd;
     HRESULT hr;
-    IDirect3DVertexShader9 *shader;
+    IDirect3DVertexShader9 *shader = NULL;
     IDirect3DVertexDeclaration9 *decl;
     DWORD shader_code[] = {
         0xfffe0101,                             /* vs_1_1           */
-- 
1.4.3.4



More information about the wine-patches mailing list