Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
bummer
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Wed, 15 Aug 2018 23:24:28 +0000 (01:24 +0200)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Wed, 15 Aug 2018 23:24:28 +0000 (01:24 +0200)
examples/s4u/platform-failures/s4u-platform-failures.cpp

index 72ac685..df3b9fa 100644 (file)
@@ -99,6 +99,7 @@ static int worker(int argc, char* argv[])
         XBT_INFO("Start execution...");
         simgrid::s4u::this_actor::execute(comp_size);
         XBT_INFO("Execution complete.");
         XBT_INFO("Start execution...");
         simgrid::s4u::this_actor::execute(comp_size);
         XBT_INFO("Execution complete.");
+        delete payload;
       } catch (xbt_ex& e) {
         if (e.category == host_error) {
           XBT_INFO("Gloups. The cpu on which I'm running just turned off!. See you!");
       } catch (xbt_ex& e) {
         if (e.category == host_error) {
           XBT_INFO("Gloups. The cpu on which I'm running just turned off!. See you!");
@@ -120,7 +121,6 @@ static int worker(int argc, char* argv[])
           xbt_die("Unexpected behavior");
       }
     }
           xbt_die("Unexpected behavior");
       }
     }
-    delete payload;
   }
   return 0;
 }
   }
   return 0;
 }