diff options
| author | Wladimir J. van der Laan <[email protected]> | 2014-10-27 10:35:59 +0100 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2014-10-27 11:05:20 +0100 |
| commit | d9702bcf7ca616b086c3a62a8efa0e10e9a9e5f7 (patch) | |
| tree | 39eec5b6aeb7e1f9c4b27b4a5cf1aa62b6d21047 /src/txdb.cpp | |
| parent | Merge pull request #5134 (diff) | |
| parent | rpc: Fix leveldb iterator leak, and flush before `gettxoutsetinfo` (diff) | |
| download | discoin-d9702bcf7ca616b086c3a62a8efa0e10e9a9e5f7.tar.xz discoin-d9702bcf7ca616b086c3a62a8efa0e10e9a9e5f7.zip | |
Merge pull request #5115
33dfbf5 rpc: Fix leveldb iterator leak, and flush before `gettxoutsetinfo` (Wladimir J. van der Laan)
Diffstat (limited to 'src/txdb.cpp')
| -rw-r--r-- | src/txdb.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/txdb.cpp b/src/txdb.cpp index cb9f15001..8a73ce961 100644 --- a/src/txdb.cpp +++ b/src/txdb.cpp @@ -104,7 +104,7 @@ bool CCoinsViewDB::GetStats(CCoinsStats &stats) const { /* It seems that there are no "const iterators" for LevelDB. Since we only need read operations on it, use a const-cast to get around that restriction. */ - leveldb::Iterator *pcursor = const_cast<CLevelDBWrapper*>(&db)->NewIterator(); + boost::scoped_ptr<leveldb::Iterator> pcursor(const_cast<CLevelDBWrapper*>(&db)->NewIterator()); pcursor->SeekToFirst(); CHashWriter ss(SER_GETHASH, PROTOCOL_VERSION); |