aboutsummaryrefslogtreecommitdiff
path: root/src/bitcoin-cli.cpp
diff options
context:
space:
mode:
author251 <13120787+251Labs@users.noreply.github.com>2017-12-29 16:20:28 +0100
committer251 <13120787+251Labs@users.noreply.github.com>2017-12-29 16:20:28 +0100
commitbdb3231bee7a729a94045133fc4335226b2b0bb9 (patch)
treefed5b8e08fe8c0cd7b6721ee48b733df9b642a2c /src/bitcoin-cli.cpp
parentd9fdac130a5ed1d96fcac6bb87c10bec9d596b17 (diff)
downloadbitcoin-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.
Diffstat (limited to 'src/bitcoin-cli.cpp')
-rw-r--r--src/bitcoin-cli.cpp1
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;
};