Skip to content

Commit

Permalink
src: address coverity warning in node_file.cc
Browse files Browse the repository at this point in the history
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 <mdawson@devrus.com>

PR-URL: #45565
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
  • Loading branch information
mhdawson authored and ruyadorno committed Nov 24, 2022
1 parent 38f1ede commit e7a5b33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node_file.cc
Expand Up @@ -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;
Expand Down

0 comments on commit e7a5b33

Please sign in to comment.