model: don't "leak" promises
authorBrian Norris <banorris@uci.edu>
Mon, 20 Aug 2012 19:53:28 +0000 (12:53 -0700)
committerBrian Norris <banorris@uci.edu>
Mon, 20 Aug 2012 19:56:23 +0000 (12:56 -0700)
model.cc

index 25f85d0..b2bb6e1 100644 (file)
--- a/model.cc
+++ b/model.cc
@@ -49,6 +49,11 @@ ModelChecker::~ModelChecker()
        delete obj_thrd_map;
        delete obj_map;
        delete action_trace;
+
+       for (unsigned int i = 0; i < promises->size(); i++)
+               delete (*promises)[i];
+       delete promises;
+
        delete thrd_last_action;
        delete node_stack;
        delete scheduler;