diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-12-13 14:04:19 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-12-18 15:16:00 +0000 |
commit | 8e60b81c48f68a2ecd8aa3cc116ae3c7b7065fef (patch) | |
tree | a1b92ab286c9171a54835398349a1de777209e37 /src/cryptonote_core/blockchain.cpp | |
parent | abstract_tcp_server2: log init_server errors as fatal (diff) | |
download | monero-8e60b81c48f68a2ecd8aa3cc116ae3c7b7065fef.tar.xz |
cryptonote_core: fix db leak on error
Diffstat (limited to 'src/cryptonote_core/blockchain.cpp')
-rw-r--r-- | src/cryptonote_core/blockchain.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp index e774dd794..6e45417c0 100644 --- a/src/cryptonote_core/blockchain.cpp +++ b/src/cryptonote_core/blockchain.cpp @@ -321,6 +321,7 @@ bool Blockchain::init(BlockchainDB* db, const bool testnet, bool offline, const if (!db->is_open()) { LOG_ERROR("Attempted to init Blockchain with unopened DB"); + delete db; return false; } |