diff options
author | John Wiegley <johnw@newartisans.com> | 2004-08-25 21:02:07 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2004-08-25 21:02:07 -0400 |
commit | ac000a67c4e9c75e11e43018e5f16242b4d99226 (patch) | |
tree | c4cf1695cfe394d35c09f7e569eee5e4de00114b /ledger.cc | |
parent | ab86cd8c3743ba5ae5c2ef2f7e20c51b870bb7e5 (diff) | |
download | fork-ledger-ac000a67c4e9c75e11e43018e5f16242b4d99226.tar.gz fork-ledger-ac000a67c4e9c75e11e43018e5f16242b4d99226.tar.bz2 fork-ledger-ac000a67c4e9c75e11e43018e5f16242b4d99226.zip |
fixed two memory corruption bugs
Diffstat (limited to 'ledger.cc')
-rw-r--r-- | ledger.cc | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -68,6 +68,8 @@ bool entry_t::valid() const return true; } +void clean_commodity_history(char * item_pool, char * item_pool_end); + journal_t::~journal_t() { DEBUG_PRINT("ledger.memory.dtors", "dtor journal_t"); @@ -86,6 +88,9 @@ journal_t::~journal_t() else (*i)->~entry_t(); + // Remove historical prices which were allocated in the item_pool. + clean_commodity_history(item_pool, item_pool_end); + if (item_pool) delete[] item_pool; } |