blockchain: always stop the ioservice before returning

Fixes a use after free
This commit is contained in:
moneromooo-monero 2015-12-28 19:53:07 +00:00
parent 78b65cf7e8
commit 4a5a5ff157
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3
1 changed files with 2 additions and 0 deletions

View File

@ -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;
}