1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-30 06:01:00 +01:00

libexpr: Use use-after-move in SampleStack::saveProfile()

(cherry picked from commit be1ade7373)
This commit is contained in:
Sergei Zimmerman 2025-10-05 16:57:13 +03:00 committed by github-actions[bot]
parent d1cec3d3ed
commit fa8230167d

View file

@ -324,7 +324,7 @@ void SampleStack::saveProfile()
std::visit([&](auto && info) { info.symbolize(state, os, posCache); }, pos);
}
os << " " << count;
writeLine(profileFd.get(), std::move(os).str());
writeLine(profileFd.get(), os.str());
/* Clear ostringstream. */
os.str("");
os.clear();