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 <[email protected]>

PR-URL: #45565
Reviewed-By: Santiago Gimeno <[email protected]>
Reviewed-By: Daeyeon Jeong <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Minwoo Jung <[email protected]>
  • Loading branch information
mhdawson authored and danielleadams committed Dec 30, 2022
1 parent ce7774b commit 7521245
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 7521245

Please sign in to comment.