From: Brian Demsky <bdemsky@uci.edu>
Date: Thu, 24 May 2012 19:09:39 +0000 (-0700)
Subject: fix one segfault bug...something is still strange, but has to do with stack
X-Git-Tag: pldi2013~395
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=977bc05c795281f164c11861de48b0b0e2111cae;p=model-checker.git

fix one segfault bug...something is still strange, but has to do with stack
---

diff --git a/snapshot-interface.cc b/snapshot-interface.cc
index 8971169..76cb8f4 100644
--- a/snapshot-interface.cc
+++ b/snapshot-interface.cc
@@ -92,13 +92,13 @@ int snapshotStack::backTrackBeforeStep(int seqindex) {
 			return stack->index;
 		}
 		struct stackEntry *tmp=stack;
-		free(tmp);
+		MYFREE(tmp);
 		stack=stack->next;
 	}
 }
 
 void snapshotStack::snapshotStep(int seqindex) {
-	struct stackEntry *tmp=(struct stackEntry *)malloc(sizeof(struct stackEntry));
+	struct stackEntry *tmp=(struct stackEntry *)MYMALLOC(sizeof(struct stackEntry));
 	tmp->next=stack;
 	tmp->index=seqindex;
 	tmp->snapshotid=takeSnapshot();