mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 00:58:19 +00:00
Expr: use class IntrusivePtr
As a side effect, this fixes lots of memory leaks in `*Expr::InitVal()` because in most implementations, the `aggr` parameter leaks.
This commit is contained in:
parent
7be3641f1d
commit
c3ea246237
17 changed files with 885 additions and 1206 deletions
|
@ -15,6 +15,7 @@
|
|||
#include "Desc.h"
|
||||
#include "DbgBreakpoint.h"
|
||||
#include "ID.h"
|
||||
#include "IntrusivePtr.h"
|
||||
#include "Frame.h"
|
||||
#include "Func.h"
|
||||
#include "Stmt.h"
|
||||
|
@ -564,13 +565,12 @@ int dbg_cmd_print(DebugCmd cmd, const vector<string>& args)
|
|||
expr += " ";
|
||||
}
|
||||
|
||||
Val* val = dbg_eval_expr(expr.c_str());
|
||||
auto val = dbg_eval_expr(expr.c_str());
|
||||
|
||||
if ( val )
|
||||
{
|
||||
ODesc d;
|
||||
val->Describe(&d);
|
||||
Unref(val);
|
||||
debug_msg("%s\n", d.Description());
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue