From 0ec1fa6a53d533478bb6d908a08fd22ebd2b438f Mon Sep 17 00:00:00 2001 From: Robin Sommer Date: Sat, 8 Oct 2011 18:22:36 -0700 Subject: [PATCH] Fixing more (small) memory leaks. --- src/Expr.cc | 4 +++- src/Obj.cc | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Expr.cc b/src/Expr.cc index bb5a1273fb..9fecab4019 100644 --- a/src/Expr.cc +++ b/src/Expr.cc @@ -221,7 +221,9 @@ bool Expr::DoUnserialize(UnserialInfo* info) tag = BroExprTag(c); - UNSERIALIZE_OPTIONAL(type, BroType::Unserialize(info)); + BroType* t = 0; + UNSERIALIZE_OPTIONAL(t, BroType::Unserialize(info)); + SetType(t); return true; } diff --git a/src/Obj.cc b/src/Obj.cc index 91aea0989b..0b82695f3d 100644 --- a/src/Obj.cc +++ b/src/Obj.cc @@ -231,6 +231,8 @@ bool BroObj::DoUnserialize(UnserialInfo* info) { DO_UNSERIALIZE(SerialObj); + delete location; + UNSERIALIZE_OPTIONAL(location, Location::Unserialize(info)); return true; }