Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Plug memory leak.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 5 Feb 2019 13:09:11 +0000 (14:09 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 5 Feb 2019 13:09:11 +0000 (14:09 +0100)
src/kernel/resource/profile/trace_mgr_test.cpp

index de942e2..97a9317 100644 (file)
@@ -51,11 +51,11 @@ static std::vector<simgrid::kernel::profile::DatedValue> trace2vector(const char
 
     REQUIRE(it == insertedIt); // Check that we find what we've put
     if (value >= 0) {
-      resource->apply_event(it, value);
       res.push_back(simgrid::kernel::profile::DatedValue(thedate, value));
     } else {
       XBT_DEBUG("%.1f: ignore an event (idx: %u)\n", thedate, it->idx);
     }
+    resource->apply_event(it, value);
   }
   tmgr_finalize();
   return res;