Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5491eb92 authored by Ryan Mitchell's avatar Ryan Mitchell Committed by Gerrit Code Review
Browse files

Merge "Fix memory leak in aapt2"

parents 20bdc266 ac55e41f
Loading
Loading
Loading
Loading
+3 −8
Original line number Diff line number Diff line
@@ -169,17 +169,12 @@ int MainImpl(int argc, char** argv) {
  aapt::text::Printer printer(&fout);

  aapt::StdErrDiagnostics diagnostics;
  auto main_command = new aapt::MainCommand(&printer, &diagnostics);
  aapt::MainCommand main_command(&printer, &diagnostics);

  // Add the daemon subcommand here so it cannot be called while executing the daemon
  main_command->AddOptionalSubcommand(
  main_command.AddOptionalSubcommand(
      aapt::util::make_unique<aapt::DaemonCommand>(&fout, &diagnostics));
  return main_command->Execute(args, &std::cerr);
}

// TODO(b/141312058) stop leaks
extern "C" const char *__asan_default_options() {
    return "detect_leaks=0";
  return main_command.Execute(args, &std::cerr);
}

int main(int argc, char** argv) {