Skip to content

Commit

Permalink
Fix memory leaks in tree_classdef_event and ..._enum
Browse files Browse the repository at this point in the history
Comments in the two classes seems to be leaking

* pt-classdef.cc: Plug memory leaks.
  • Loading branch information
pvilhelm committed Nov 4, 2023
1 parent e4be167 commit 912c6e6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libinterp/parse-tree/pt-classdef.h
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,7 @@ class tree_classdef_event
~tree_classdef_event ()
{
delete m_id;
delete m_comments;
}

tree_identifier * ident () { return m_id; }
Expand Down Expand Up @@ -498,6 +499,7 @@ class tree_classdef_enum
{
delete m_id;
delete m_expr;
delete m_comments;
}

tree_identifier * ident () { return m_id; }
Expand Down

0 comments on commit 912c6e6

Please sign in to comment.