mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 22:58:20 +00:00
Scope: lookup_ID() and install_ID() return IntrusivePtr<ID>
This fixes several memory leaks and double free bugs.
This commit is contained in:
parent
cbb6f09726
commit
528cf11a5c
14 changed files with 60 additions and 100 deletions
|
@ -133,9 +133,9 @@ ComponentManager<T, C>::ComponentManager(const string& arg_module, const string&
|
|||
: module(arg_module),
|
||||
tag_enum_type(make_intrusive<EnumType>(module + "::" + local_id))
|
||||
{
|
||||
::ID* id = install_ID(local_id.c_str(), module.c_str(), true, true);
|
||||
add_type(id, tag_enum_type, 0);
|
||||
zeekygen_mgr->Identifier(id);
|
||||
auto id = install_ID(local_id.c_str(), module.c_str(), true, true);
|
||||
add_type(id.get(), tag_enum_type, 0);
|
||||
zeekygen_mgr->Identifier(id.get());
|
||||
}
|
||||
|
||||
template <class T, class C>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue