Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
plug some leak by delete last message before leaving
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Thu, 6 Apr 2017 06:46:36 +0000 (08:46 +0200)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Thu, 6 Apr 2017 06:46:36 +0000 (08:46 +0200)
examples/s4u/dht-chord/node.cpp
examples/s4u/dht-chord/s4u_dht-chord.hpp

index 6ce9d5c..d820693 100644 (file)
@@ -392,7 +392,7 @@ void Node::remoteNotify(int notify_id, int predecessor_candidate_id)
     simgrid::s4u::this_actor::isend(mailbox, message, 10);
   } catch (xbt_ex& e) {
     if (e.category == timeout_error) {
-      XBT_DEBUG("Send of 'Notify' failed due du an expired timeout on receiver side");
+      XBT_DEBUG("Send of 'Notify' failed due to an expired timeout on receiver side");
       delete message;
     }
   }
index 3e7cf06..095ea8c 100644 (file)
@@ -156,7 +156,9 @@ public:
       }
       now = simgrid::s4u::Engine::instance()->getClock();
     }
-
+    if (data != nullptr) {
+      delete static_cast<ChordMessage*>(data);
+    }
     // leave the ring
     leave();
   }