diff options
| author | 2019-09-30 13:11:51 -0700 | |
|---|---|---|
| committer | 2019-09-30 13:11:51 -0700 | |
| commit | 4092468b679b5a9b24bc2e8af99748fc4530dbdf (patch) | |
| tree | ec0384af5e94d3977350607d10fafa48f70b18fc | |
| parent | 1fae7704a54b7eb98f57a12aec4b67eff0254d64 (diff) | |
| parent | fe7f2febfff603d0c038a922affb66cde2784d4b (diff) | |
Merge "Fix memory leak in aapt2" am: 5491eb92fc am: f26f7a206f
am: fe7f2febff
Change-Id: Idb437f74240502bf677cafca410be91bdc2fcf78
| -rw-r--r-- | tools/aapt2/Main.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/tools/aapt2/Main.cpp b/tools/aapt2/Main.cpp index 7966ba27ebd8..8a43bb4ede35 100644 --- a/tools/aapt2/Main.cpp +++ b/tools/aapt2/Main.cpp @@ -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) { |