From f5db521aa7ef9ef73bd03824b4addc90b99b5f2d Mon Sep 17 00:00:00 2001 From: Heiko Hund Date: Tue, 13 Aug 2024 01:48:00 +0200 Subject: [PATCH] WinSvc: define virtual d'tor The Windows Service class did not specify its destructor as virtual, but has other virtual function. Not specifying the d'tor virtual is an anti-pattern in this case. Signed-off-by: Heiko Hund --- openvpn/win/winsvc.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openvpn/win/winsvc.hpp b/openvpn/win/winsvc.hpp index 0928ffaa..2b302f97 100644 --- a/openvpn/win/winsvc.hpp +++ b/openvpn/win/winsvc.hpp @@ -59,6 +59,8 @@ class Service checkpoint = 1; } + virtual ~Service() = default; + bool is_service() const { return bool(service);