Skip to content
Snippets Groups Projects
Commit c8a83171 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Fix CID 508259: Control flow issue (DEADCODE)

... introduced in commit 54523145
parent 54277dec
No related branches found
No related tags found
1 merge request!455Update branch with changes from master
...@@ -399,7 +399,7 @@ js_execfile(JSContext *cx, uintN argc, jsval *arglist) ...@@ -399,7 +399,7 @@ js_execfile(JSContext *cx, uintN argc, jsval *arglist)
if(pjs_obj == NULL) { if(pjs_obj == NULL) {
free(cmd); free(cmd);
free(startup_dir); free(startup_dir);
JS_ReportError(cx, "Invalid js object"); JS_ReportError(cx, "Unable to get parent js object");
return JS_FALSE; return JS_FALSE;
} }
js_callback = JS_GetPrivate(cx, pjs_obj); js_callback = JS_GetPrivate(cx, pjs_obj);
...@@ -458,7 +458,7 @@ js_execfile(JSContext *cx, uintN argc, jsval *arglist) ...@@ -458,7 +458,7 @@ js_execfile(JSContext *cx, uintN argc, jsval *arglist)
js_PrepareToExecute(cx, js_scope, path, startup_dir, js_scope); js_PrepareToExecute(cx, js_scope, path, startup_dir, js_scope);
free(startup_dir); free(startup_dir);
// Copy in the load_path_list... // Copy in the load_path_list...
if(pjs_obj != NULL) { {
JSObject* pload_path_list; JSObject* pload_path_list;
JSObject* load_path_list; JSObject* load_path_list;
uint32_t plen; uint32_t plen;
...@@ -487,10 +487,6 @@ js_execfile(JSContext *cx, uintN argc, jsval *arglist) ...@@ -487,10 +487,6 @@ js_execfile(JSContext *cx, uintN argc, jsval *arglist)
return JS_FALSE; return JS_FALSE;
} }
} }
else {
JS_ReportError(cx, "Unable to get parent js object");
return JS_FALSE;
}
js_script=JS_CompileFile(cx, js_scope, path); js_script=JS_CompileFile(cx, js_scope, path);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment