Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
correct the leak of memory that correspond to EndLinEvent
authorTakishipp <toufik.boubehziz@gmail.com>
Thu, 8 Jun 2017 12:22:35 +0000 (14:22 +0200)
committerTakishipp <toufik.boubehziz@gmail.com>
Thu, 8 Jun 2017 12:22:35 +0000 (14:22 +0200)
src/instr/instr_paje_trace.cpp
src/instr/instr_private.h

index c6cc61b..78f726e 100644 (file)
@@ -909,7 +909,11 @@ EndLinkEvent::EndLinkEvent (double timestamp, container_t container, type_t type
   insert_into_buffer (this);
 }
 
-
+EndLinkEvent::~EndLinkEvent()
+{
+  free(value);
+  free(key);
+}
 void EndLinkEvent::print() {
   if (instr_fmt_type == instr_fmt_paje) {
     XBT_DEBUG("%s: event_type=%d, timestamp=%.*f", __FUNCTION__, (int)event_type, TRACE_precision(), timestamp);
index 4c49f14..6eb6044 100644 (file)
@@ -294,6 +294,7 @@ class EndLinkEvent : public PajeEvent  {
   public:
   EndLinkEvent (double timestamp, container_t container, type_t type, container_t destContainer,
                                   const char *value, const char *key);
+  ~EndLinkEvent();
   void print() override;
 };