mirror of
https://github.com/monero-project/monero.git
synced 2024-12-26 22:59:25 -05:00
berkeleydb: fix delete/free mismatch
Despite being C++, the stats object is allocated by the underlying C layer using malloc(3).
This commit is contained in:
parent
1642be242d
commit
3a0f4d8a57
@ -925,12 +925,12 @@ void BlockchainBDB::open(const std::string& filename, const int db_flags)
|
||||
// to zero (0) for reliability.
|
||||
m_blocks->stat(NULL, &stats, 0);
|
||||
m_height = stats->bt_nkeys;
|
||||
delete stats;
|
||||
free(stats);
|
||||
|
||||
// see above comment about DB_FAST_STAT
|
||||
m_output_indices->stat(NULL, &stats, 0);
|
||||
m_num_outputs = stats->bt_nkeys;
|
||||
delete stats;
|
||||
free(stats);
|
||||
|
||||
// checks for compatibility
|
||||
bool compatible = true;
|
||||
|
Loading…
Reference in New Issue
Block a user