Fix use-after-free in Trigger.cc

timeout_val is used _right_ after it is Unref'd.
This commit is contained in:
Johanna Amann 2017-10-18 15:57:40 -07:00
parent 9b59157d19
commit 28498f752b

View file

@ -136,8 +136,8 @@ Trigger::Trigger(Expr* arg_cond, Stmt* arg_body, Stmt* arg_timeout_stmts,
if ( timeout_val )
{
Unref(timeout_val);
timeout_value = timeout_val->AsInterval();
Unref(timeout_val);
}
// Make sure we don't get deleted if somebody calls a method like