From: trevor_hansen Date: Sat, 24 Apr 2010 12:06:16 +0000 (+0000) Subject: Fix leaks in the CVC parser X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=73600fcc1ca00392bf246b0c88da3e4eb12999d2;p=francis%2Fstp.git Fix leaks in the CVC parser git-svn-id: https://stp-fast-prover.svn.sourceforge.net/svnroot/stp-fast-prover/trunk/stp@702 e59a4935-1847-0410-ae03-e826735625c1 --- diff --git a/src/parser/CVC.y b/src/parser/CVC.y index 2a29825..b2367d3 100644 --- a/src/parser/CVC.y +++ b/src/parser/CVC.y @@ -322,6 +322,7 @@ VarDecl : FORM_IDs ':' Type parserInterface->letMgr.LetExprMgr(*i,*$5); delete $5; + delete $1; } } | FORM_IDs ':' Type '=' Formula @@ -1134,17 +1135,22 @@ ArrayUpdateExpr : Expr WITH_TOK Updates BVTypeCheck(*result); $$ = result; delete $3; + delete $1; } ; Updates : '[' Expr ']' ASSIGN_TOK Expr { $$ = new ASTNodeMap(); - (*$$)[*$2] = *$5; + (*$$)[*$2] = *$5; + delete $2; + delete $5; } | Updates WITH_TOK '[' Expr ']' ASSIGN_TOK Expr { (*$1)[*$4] = *$7; + delete $4; + delete $7; } ;