diff options
| author | 2019-09-30 13:20:21 -0700 | |
|---|---|---|
| committer | 2019-09-30 13:20:21 -0700 | |
| commit | f28b8b74184d2484c69b75bce00124bc6d3dd4d7 (patch) | |
| tree | 72ff075eb518ef376cd19549e4a422fddeb87bf7 /tools/aapt2 | |
| parent | 275af5db136df04badde7d56207285dc6f199653 (diff) | |
| parent | 4092468b679b5a9b24bc2e8af99748fc4530dbdf (diff) | |
Merge "Fix memory leak in aapt2" am: 5491eb92fc am: f26f7a206f am: fe7f2febff
am: 4092468b67
Change-Id: I279871838884c114519a19af384e866ceb4bc7c5
Diffstat (limited to 'tools/aapt2')
| -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) { |