From 1e48a5a5b01751cdb448621c9d431f3bea6bd8df Mon Sep 17 00:00:00 2001 From: Michael Dawson Date: Mon, 21 Nov 2022 16:23:49 -0500 Subject: [PATCH] src: address coverity warning in node_file.cc Address coverity warning that looks like it identifies a potential crash due to using a value after it's been passed into std::move Signed-off-by: Michael Dawson PR-URL: https://github.com/nodejs/node/pull/45565 Reviewed-By: Santiago Gimeno Reviewed-By: Daeyeon Jeong Reviewed-By: Luigi Pinca Reviewed-By: Minwoo Jung --- src/node_file.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node_file.cc b/src/node_file.cc index cdfcf5bac29c3a..e7d40c40d5b6fb 100644 --- a/src/node_file.cc +++ b/src/node_file.cc @@ -1584,7 +1584,7 @@ int MKDirpAsync(uv_loop_t* loop, std::string dirname = path.substr(0, path.find_last_of(kPathSeparator)); if (dirname != path) { - req_wrap->continuation_data()->PushPath(std::move(path)); + req_wrap->continuation_data()->PushPath(path); req_wrap->continuation_data()->PushPath(std::move(dirname)); } else if (req_wrap->continuation_data()->paths().size() == 0) { err = UV_EEXIST;