From 10f87f7e3f08335421fd60a2b49840289cd737de Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 14 May 2020 11:24:28 +0200 Subject: 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 --- apt-pkg/cachefilter-patterns.h | 1 + 1 file changed, 1 insertion(+) (limited to 'apt-pkg') 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 -- cgit v1.2.3