From cd4b0626c259270236df3288ea08e9d90f51315c Mon Sep 17 00:00:00 2001 From: Michael Dawson Date: Mon, 21 Nov 2022 16:08:26 -0500 Subject: [PATCH] node-api: address coverity warning - address coverity unitialized variable warning Signed-off-by: Michael Dawson PR-URL: https://github.com/nodejs/node/pull/45563 Reviewed-By: Colin Ihrig Reviewed-By: Richard Lau Reviewed-By: Daeyeon Jeong Reviewed-By: Rich Trott Reviewed-By: Chengzhong Wu Reviewed-By: Luigi Pinca --- src/node_api.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node_api.cc b/src/node_api.cc index 50a0619bdbd143..8f1e4fb0e40d4a 100644 --- a/src/node_api.cc +++ b/src/node_api.cc @@ -633,7 +633,7 @@ void napi_module_register_by_symbol(v8::Local exports, // Create a new napi_env for this specific module. napi_env env = v8impl::NewEnv(context, module_filename); - napi_value _exports; + napi_value _exports = nullptr; env->CallIntoModule([&](napi_env env) { _exports = init(env, v8impl::JsValueFromV8LocalValue(exports)); });