diff options
author | 251 <13120787+251Labs@users.noreply.github.com> | 2017-12-29 16:20:28 +0100 |
---|---|---|
committer | 251 <13120787+251Labs@users.noreply.github.com> | 2017-12-29 16:20:28 +0100 |
commit | bdb3231bee7a729a94045133fc4335226b2b0bb9 (patch) | |
tree | fed5b8e08fe8c0cd7b6721ee48b733df9b642a2c | |
parent | d9fdac130a5ed1d96fcac6bb87c10bec9d596b17 (diff) | |
download | bitcoin-bdb3231bee7a729a94045133fc4335226b2b0bb9.tar.xz |
Implements a virtual destructor on the BaseRequestHandler class.
Implements a virtual destructor on the BaseRequestHandler class to protect against undefined behavior in
the event that a derived BaseRequestHandler class has a destructor and an object of such derived class
is destroyed through a pointer to its base class.
-rw-r--r-- | src/bitcoin-cli.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp index 136981b709..1fe93180f0 100644 --- a/src/bitcoin-cli.cpp +++ b/src/bitcoin-cli.cpp @@ -198,6 +198,7 @@ static void http_error_cb(enum evhttp_request_error err, void *ctx) class BaseRequestHandler { public: + virtual ~BaseRequestHandler() {} virtual UniValue PrepareRequest(const std::string& method, const std::vector<std::string>& args) = 0; virtual UniValue ProcessReply(const UniValue &batch_in) = 0; }; |