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 danielleadams committed Jan 3, 2023
1 parent cd4b062 commit 1e48a5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node_file.cc
Original file line number Diff line number Diff line change
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 1e48a5a

Please sign in to comment.