diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2015-12-28 19:53:07 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2015-12-28 22:47:46 +0000 |
commit | 4a5a5ff1573cc6a1081b28ef8611ca8bf8417800 (patch) | |
tree | 9c41b580db73e6c229c6c1ce997c0abe58b8d994 | |
parent | db_lmdb: safety close db at exit (diff) | |
download | monero-4a5a5ff1573cc6a1081b28ef8611ca8bf8417800.tar.xz |
blockchain: always stop the ioservice before returning
Fixes a use after free
-rw-r--r-- | src/cryptonote_core/blockchain.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp index 71a2b8841..02cb348d6 100644 --- a/src/cryptonote_core/blockchain.cpp +++ b/src/cryptonote_core/blockchain.cpp @@ -2113,6 +2113,7 @@ bool Blockchain::check_tx_inputs(const transaction& tx, uint64_t* pmax_used_bloc if(have_tx_keyimg_as_spent(in_to_key.k_image)) { LOG_PRINT_L1("Key image already spent in blockchain: " << epee::string_tools::pod_to_hex(in_to_key.k_image)); + KILL_IOSERVICE(); return false; } @@ -2126,6 +2127,7 @@ bool Blockchain::check_tx_inputs(const transaction& tx, uint64_t* pmax_used_bloc if(!itk->second) { LOG_PRINT_L1("Failed ring signature for tx " << get_transaction_hash(tx) << " vin key with k_image: " << in_to_key.k_image << " sig_index: " << sig_index); + KILL_IOSERVICE(); return false; } |