Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
plug a memleak
authorMartin Quinson <martin.quinson@loria.fr>
Wed, 8 Mar 2017 09:41:53 +0000 (10:41 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Wed, 8 Mar 2017 09:41:53 +0000 (10:41 +0100)
examples/s4u/app-token-ring/s4u_app-token-ring.cpp

index 968073f..3b6b1b7 100644 (file)
@@ -40,6 +40,7 @@ public:
       simgrid::s4u::this_actor::send(neighbor_mailbox, xbt_strdup("Token"), task_comm_size);
       char* res = static_cast<char*>(simgrid::s4u::this_actor::recv(my_mailbox));
       XBT_INFO("Host \"%u\" received \"%s\"", rank, res);
+      xbt_free(res);
     } else {
       char* res = static_cast<char*>(simgrid::s4u::this_actor::recv(my_mailbox));
       XBT_INFO("Host \"%u\" received \"%s\"", rank, res);