mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00: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
1 changed files with 2 additions and 2 deletions
|
@ -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 a new issue