Skip to content

Commit

Permalink
fix: dangling string in DebugCmd::Reload (#3981)
Browse files Browse the repository at this point in the history
Assigning the result of absl::AsciiStrToUpper() to a string_view dangles

Signed-off-by: kostas <[email protected]>
  • Loading branch information
kostasrim authored Oct 24, 2024
1 parent 805f020 commit b716040
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server/debugcmd.cc
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ void DebugCmd::Reload(CmdArgList args) {
bool save = true;

for (size_t i = 1; i < args.size(); ++i) {
string_view opt = absl::AsciiStrToUpper(ArgS(args, i));
string opt = absl::AsciiStrToUpper(ArgS(args, i));
VLOG(1) << "opt " << opt;

if (opt == "NOSAVE") {
Expand Down

0 comments on commit b716040

Please sign in to comment.