]> git.kaiwu.me - njs.git/commitdiff
Fixed dead store assignment in r.subrequest().
authorDmitry Volyntsev <xeioex@nginx.com>
Sat, 12 Oct 2024 01:41:27 +0000 (18:41 -0700)
committerDmitry Volyntsev <xeioexception@gmail.com>
Mon, 14 Oct 2024 23:51:54 +0000 (16:51 -0700)
Found by Clang static analyzer.

nginx/ngx_http_js_module.c

index c34fccbdd2118ab6501e0b5dffff804dfe55651c..6f026293999aa77c097d37a5fd5d0f05e60e16e4 100644 (file)
@@ -3474,7 +3474,6 @@ ngx_http_js_ext_subrequest(njs_vm_t *vm, njs_value_t *args, njs_uint_t nargs,
         return NJS_ERROR;
     }
 
-    promise = 0;
     flags = NGX_HTTP_SUBREQUEST_BACKGROUND;
 
     njs_value_undefined_set(retval);
@@ -5859,7 +5858,6 @@ ngx_http_qjs_ext_subrequest(JSContext *cx, JSValueConst this_val,
                                      "exclusive");
     }
 
-    promise = 0;
     retval = JS_UNDEFINED;
     flags = NGX_HTTP_SUBREQUEST_BACKGROUND;