From 7c963cc84926f3cec0d7d1f2e1a046c3b0d6f62f Mon Sep 17 00:00:00 2001 From: Kristof Szabados <Kristof.Szabados@ericsson.com> Date: Thu, 24 Nov 2016 12:16:54 +0100 Subject: [PATCH] return to original code for safety reasons Signed-off-by: Kristof Szabados <Kristof.Szabados@ericsson.com> --- compiler2/ttcn3/Ttcnstuff.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/compiler2/ttcn3/Ttcnstuff.cc b/compiler2/ttcn3/Ttcnstuff.cc index bd683bd15..e51f7aa23 100644 --- a/compiler2/ttcn3/Ttcnstuff.cc +++ b/compiler2/ttcn3/Ttcnstuff.cc @@ -2378,11 +2378,10 @@ namespace Ttcn { ExtensionAttributes::~ExtensionAttributes() { - if(size() > 0) { - for (size_t i = size()-1; i >= 0; --i) { - delete operator [](i); - } + for (int i = size()-1; i >= 0; --i) { + delete operator [](i); } + clear(); } -- GitLab