[torque] fix memory leak

Change-Id: I9ca9d0d81ed37bdddd3286b3ebc46f2ecdacb248
Reviewed-on: https://chromium-review.googlesource.com/1063612
Reviewed-by: Daniel Clifford <danno@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53228}
This commit is contained in:
Tobias Tebbi 2018-05-17 10:08:26 +02:00 committed by Commit Bot
parent 24c1d35a32
commit 9295c42ca1

View File

@ -232,7 +232,8 @@ Macro* Declarations::DeclareMacro(const std::string& name,
ReportError(s.str());
}
}
return macro_list->AddMacro(new Macro(name, signature));
return macro_list->AddMacro(
RegisterDeclarable(std::unique_ptr<Macro>(new Macro(name, signature))));
}
Builtin* Declarations::DeclareBuiltin(const std::string& name,