From: Martin Quinson Date: Thu, 8 Jun 2017 12:56:05 +0000 (+0200) Subject: Merge pull request #183 from Takishipp/leak_memory X-Git-Tag: v3.16~139^2 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/481a8cb5ef6497dde60dcbca9971368c64879bfd?hp=212f410b75a1c5886c7b831adef56cde7e338d3e Merge pull request #183 from Takishipp/leak_memory Correct the leak of memory that correspond to EndLinEvent --- diff --git a/src/instr/instr_paje_trace.cpp b/src/instr/instr_paje_trace.cpp index c6cc61bcce..78f726ecdf 100644 --- a/src/instr/instr_paje_trace.cpp +++ b/src/instr/instr_paje_trace.cpp @@ -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); diff --git a/src/instr/instr_private.h b/src/instr/instr_private.h index 4c49f14eed..6eb604427c 100644 --- a/src/instr/instr_private.h +++ b/src/instr/instr_private.h @@ -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; };