From 271f298635567b7aef922316e14b910fda0c508e Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 20 Oct 2009 18:44:44 +0000 Subject: [PATCH] Since add_property creates new XMLProperty objects, remove_property should probably delete them. Although remove_property is only used in one place in Ardour that I can see. git-svn-id: svn://localhost/ardour2/branches/3.0@5824 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/pbd/xml++.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/pbd/xml++.cc b/libs/pbd/xml++.cc index eb48c8e346..90d7c3cf48 100644 --- a/libs/pbd/xml++.cc +++ b/libs/pbd/xml++.cc @@ -413,7 +413,9 @@ void XMLNode::remove_property(const string& n) { if (_propmap.find(n) != _propmap.end()) { - _proplist.remove(_propmap[n]); + XMLProperty* p = _propmap[n]; + _proplist.remove (p); + delete p; _propmap.erase(n); } }