From b9aebe51a9170e99572527706c7370df86e8406c Mon Sep 17 00:00:00 2001 From: Ulya Trofimovich Date: Wed, 11 May 2016 11:48:01 +0100 Subject: [PATCH] Fixed memleak. --- re2c/src/ir/tag.cc | 5 +++++ re2c/src/ir/tag.h | 1 + 2 files changed, 6 insertions(+) diff --git a/re2c/src/ir/tag.cc b/re2c/src/ir/tag.cc index 6b650800..abd5b9de 100644 --- a/re2c/src/ir/tag.cc +++ b/re2c/src/ir/tag.cc @@ -17,6 +17,11 @@ Tag::Tag() , name(NULL) {} +Tag::~Tag() +{ + delete name; +} + void init_var_tag(Tag &tag, size_t r, const std::string *n, size_t o) { tag.type = Tag::VAR; diff --git a/re2c/src/ir/tag.h b/re2c/src/ir/tag.h index bfe0ab4c..bb193b48 100644 --- a/re2c/src/ir/tag.h +++ b/re2c/src/ir/tag.h @@ -29,6 +29,7 @@ struct Tag }; Tag(); + ~Tag(); FORBID_COPY(Tag); }; -- 2.40.0