diff --git a/base/cvd/cuttlefish/host/commands/cvd/frontline_parser.cpp b/base/cvd/cuttlefish/host/commands/cvd/frontline_parser.cpp index 867b0bd6c2..fd1aa6e855 100644 --- a/base/cvd/cuttlefish/host/commands/cvd/frontline_parser.cpp +++ b/base/cvd/cuttlefish/host/commands/cvd/frontline_parser.cpp @@ -16,6 +16,7 @@ #include "host/commands/cvd/frontline_parser.h" +#include #include #include @@ -51,11 +52,11 @@ Result ExtractCvdArgs(cvd_common::Args& args) { Result> FrontlineParser::Parse( ParserParam param) { CF_EXPECT(!param.all_args.empty()); - FrontlineParser* frontline_parser = new FrontlineParser(param); + std::unique_ptr frontline_parser(new FrontlineParser(param)); CF_EXPECT(frontline_parser != nullptr, "Memory allocation for FrontlineParser failed."); CF_EXPECT(frontline_parser->Separate()); - return std::unique_ptr(frontline_parser); + return frontline_parser; } FrontlineParser::FrontlineParser(const ParserParam& param)