diff options
| author | 2019-09-30 12:41:15 -0700 | |
|---|---|---|
| committer | 2019-09-30 12:41:15 -0700 | |
| commit | f26f7a206f499c632c15ed203ceb92e914906c23 (patch) | |
| tree | b33dff6d698b42636813e164f1e197ed31089e4a /tools/aapt2/Main.cpp | |
| parent | 0b6d97471308930abaf6cb09a1806f8abef721e4 (diff) | |
| parent | 5491eb92fc9497c3688c0d2b13effd06c6f175e4 (diff) | |
Merge "Fix memory leak in aapt2"
am: 5491eb92fc
Change-Id: I13967aeb1c57ef196820a9f3beecd53fc490d91e
Diffstat (limited to 'tools/aapt2/Main.cpp')
| -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) { |