Commit 9295c42c authored by Tobias Tebbi's avatar Tobias Tebbi Committed by Commit Bot

[torque] fix memory leak

Change-Id: I9ca9d0d81ed37bdddd3286b3ebc46f2ecdacb248
Reviewed-on: https://chromium-review.googlesource.com/1063612Reviewed-by: 's avatarDaniel Clifford <danno@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53228}
parent 24c1d35a
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment