]> granicus.if.org Git - re2c/commitdiff
Fixed memleak.
authorUlya Trofimovich <skvadrik@gmail.com>
Wed, 11 May 2016 10:48:01 +0000 (11:48 +0100)
committerUlya Trofimovich <skvadrik@gmail.com>
Wed, 11 May 2016 10:48:01 +0000 (11:48 +0100)
re2c/src/ir/tag.cc
re2c/src/ir/tag.h

index 6b650800cc956dffb82f6f30ee13c5c757381beb..abd5b9dec98bf87cb926000df5fb0c9808017ef2 100644 (file)
@@ -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;
index bfe0ab4cc75177ea24cc63c0ccc7ac7e95b4c5d9..bb193b48fd09d02ecf4099686257a0a4c74cb85b 100644 (file)
@@ -29,6 +29,7 @@ struct Tag
        };
 
        Tag();
+       ~Tag();
        FORBID_COPY(Tag);
 };