[PATCH] jscript: Initialize this_obj with NULL (Coverity)

Marcus Meissner marcus at jet.franken.de
Sun Sep 20 12:00:09 CDT 2009


Hi,

There is a codepath where this_obj might be uninitialized
and used. The call_function code handles this_obj NULL,
so initialize it.

Ciao, Marcus
---
 dlls/jscript/function.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/jscript/function.c b/dlls/jscript/function.c
index 83de7ca..6922275 100644
--- a/dlls/jscript/function.c
+++ b/dlls/jscript/function.c
@@ -399,7 +399,7 @@ static HRESULT Function_apply(DispatchEx *dispex, LCID lcid, WORD flags, DISPPAR
     FunctionInstance *function;
     DISPPARAMS args = {NULL,NULL,0,0};
     DWORD argc, i;
-    IDispatch *this_obj;
+    IDispatch *this_obj = NULL;
     HRESULT hres = S_OK;
 
     TRACE("\n");
-- 
1.5.6



More information about the wine-patches mailing list