diff options
| author | 2019-09-30 12:57:49 -0700 | |
|---|---|---|
| committer | 2019-09-30 12:57:49 -0700 | |
| commit | fe7f2febfff603d0c038a922affb66cde2784d4b (patch) | |
| tree | 32c189186def2cfc81da1199d6e3542bd3177e33 | |
| parent | 48547ce1d0e5cebed350b6c0aebcbe49a301357e (diff) | |
| parent | f26f7a206f499c632c15ed203ceb92e914906c23 (diff) | |
Merge "Fix memory leak in aapt2" am: 5491eb92fc
am: f26f7a206f
Change-Id: I658bb39d0252e503677ffbb0db3d298716f33a64
| -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) { |