summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2020-05-14 11:24:28 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2020-05-25 12:05:00 +0200
commit10f87f7e3f08335421fd60a2b49840289cd737de (patch)
treeb6d7d9dfdd0ee9ce88d125c8261e9337d37d2ac6
parentc378f9ee5746b06ead26793881b1449c53b1d7c6 (diff)
Mark PatternTreeParser::Node destructor as virtual
The non-virtual base-destructor causes its derivate classes to leak tiny bits of memory otherwise. The header is private and not to be used outside of APT, so we can perform this tiny ABI break as there is no ABI to break. Reported-By: valgrind and clang -fsanitize=leak
-rw-r--r--apt-pkg/cachefilter-patterns.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/apt-pkg/cachefilter-patterns.h b/apt-pkg/cachefilter-patterns.h
index 093364ff1..d64bc4ccf 100644
--- a/apt-pkg/cachefilter-patterns.h
+++ b/apt-pkg/cachefilter-patterns.h
@@ -48,6 +48,7 @@ struct APT_PUBLIC PatternTreeParser
virtual std::ostream &render(std::ostream &os) { return os; };
std::nullptr_t error(std::string message);
+ virtual ~Node() = default;
};
struct Error : public std::exception