DistributedLB: avoid leaking memory from tuple reductions 57/5157/2
authorSam White <white67@illinois.edu>
Thu, 2 May 2019 20:58:58 +0000 (15:58 -0500)
committerSam White <white67@illinois.edu>
Thu, 2 May 2019 21:00:21 +0000 (16:00 -0500)
Change-Id: I42c0002b1c7ae24962b0989ad8e06c2e9789e81e

src/ck-ldb/DistributedLB.C

index ab423e45dc4244adb806feba23d516077957689d..e93caa25c0b95adf53d543a1b6ed5688faf83303 100644 (file)
@@ -144,6 +144,7 @@ void DistributedLB::LoadReduction(CkReductionMsg* redn_msg) {
           kTargetRatio);
     }
     PackAndSendMigrateMsgs();
+    delete [] results;
     return;
   }
 
@@ -167,6 +168,7 @@ void DistributedLB::LoadReduction(CkReductionMsg* redn_msg) {
     CkCallback cb(CkIndex_DistributedLB::DoneGossip(), thisProxy);
     CkStartQD(cb);
   }
+  delete [] results;
 }
 
 /*
@@ -362,6 +364,7 @@ void DistributedLB::AfterLBReduction(CkReductionMsg* redn_msg) {
     if (!(_lb_args.metaLbOn() && _lb_args.metaLbModelDir() != nullptr))
       theLbdb->nextLoadbalancer(seqno);
   }
+  delete [] results;
 }
 
 /*