]> git.unchartedbackwaters.co.uk Git - francis/stp.git/commitdiff
* Fix the use of an invalidated iterator in the CVC parser.
authortrevor_hansen <trevor_hansen@e59a4935-1847-0410-ae03-e826735625c1>
Mon, 10 May 2010 13:26:58 +0000 (13:26 +0000)
committertrevor_hansen <trevor_hansen@e59a4935-1847-0410-ae03-e826735625c1>
Mon, 10 May 2010 13:26:58 +0000 (13:26 +0000)
* Fix a small memory leak in the CVC parser.

git-svn-id: https://stp-fast-prover.svn.sourceforge.net/svnroot/stp-fast-prover/trunk/stp@756 e59a4935-1847-0410-ae03-e826735625c1

src/parser/CVC.y

index b2367d359356e9d0f6fec60672c26f688777c992..b451936042d65bc6b492ba5c017726c6e07f9d51 100644 (file)
@@ -321,9 +321,9 @@ VarDecl         :      FORM_IDs ':' Type
     i->SetIndexWidth($5->GetIndexWidth());
                            
     parserInterface->letMgr.LetExprMgr(*i,*$5);
+  }
     delete $5;
     delete $1;
-  }
 }
 |      FORM_IDs ':' Type '=' Formula
 {
@@ -340,8 +340,9 @@ VarDecl         :      FORM_IDs ':' Type
     i->SetIndexWidth($5->GetIndexWidth());
                            
     parserInterface->letMgr.LetExprMgr(*i,*$5);
-    delete $5;
   }
+  delete $5;
+  delete $1;
 }                
 ;