mirror of
https://github.com/zeek/zeek.git
synced 2025-10-05 16:18:19 +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
|
@ -88,10 +88,10 @@ extern bool in_debug;
|
|||
|
||||
// If no_global is true, don't search in the default "global" namespace.
|
||||
// This passed ownership of a ref'ed ID to the caller.
|
||||
extern ID* lookup_ID(const char* name, const char* module,
|
||||
extern IntrusivePtr<ID> lookup_ID(const char* name, const char* module,
|
||||
bool no_global = false, bool same_module_only = false,
|
||||
bool check_export = true);
|
||||
extern ID* install_ID(const char* name, const char* module_name,
|
||||
extern IntrusivePtr<ID> install_ID(const char* name, const char* module_name,
|
||||
bool is_global, bool is_export);
|
||||
|
||||
extern void push_scope(ID* id, attr_list* attrs);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue