fix one segfault bug...something is still strange, but has to do with stack
authorBrian Demsky <bdemsky@uci.edu>
Thu, 24 May 2012 19:09:39 +0000 (12:09 -0700)
committerBrian Demsky <bdemsky@uci.edu>
Thu, 24 May 2012 19:09:39 +0000 (12:09 -0700)
snapshot-interface.cc

index 8971169786717cb84201208d565d152d7f80f7cc..76cb8f4ea2635afc940fec658477840d9933dbc1 100644 (file)
@@ -92,13 +92,13 @@ int snapshotStack::backTrackBeforeStep(int seqindex) {
                        return stack->index;
                }
                struct stackEntry *tmp=stack;
                        return stack->index;
                }
                struct stackEntry *tmp=stack;
-               free(tmp);
+               MYFREE(tmp);
                stack=stack->next;
        }
 }
 
 void snapshotStack::snapshotStep(int seqindex) {
                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();
        tmp->next=stack;
        tmp->index=seqindex;
        tmp->snapshotid=takeSnapshot();