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

Commit f26f7a20 authored by Ryan Mitchell's avatar Ryan Mitchell Committed by android-build-merger
Browse files

Merge "Fix memory leak in aapt2"

am: 5491eb92

Change-Id: I13967aeb1c57ef196820a9f3beecd53fc490d91e
parents 0b6d9747 5491eb92
Loading
Loading
Loading
Loading
+3 −8
Original line number Original line Diff line number Diff line
@@ -169,17 +169,12 @@ int MainImpl(int argc, char** argv) {
  aapt::text::Printer printer(&fout);
  aapt::text::Printer printer(&fout);


  aapt::StdErrDiagnostics diagnostics;
  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
  // 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));
      aapt::util::make_unique<aapt::DaemonCommand>(&fout, &diagnostics));
  return main_command->Execute(args, &std::cerr);
  return main_command.Execute(args, &std::cerr);
}

// TODO(b/141312058) stop leaks
extern "C" const char *__asan_default_options() {
    return "detect_leaks=0";
}
}


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