diff --git a/CHANGELOG.md b/CHANGELOG.md index f7ec759f9b..a96a851caf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ### Improvements * (versiondb) [#1379](https://github.com/crypto-org-chain/cronos/pull/1379) Flush versiondb when graceful shutdown, make rocksdb upgrade smooth. +* (versiondb) [#1491](https://github.com/crypto-org-chain/cronos/pull/1491) Free slice data in HasAtVersion. ### Bug Fixes diff --git a/versiondb/tsrocksdb/store.go b/versiondb/tsrocksdb/store.go index be34c74632..7d4176c5d0 100644 --- a/versiondb/tsrocksdb/store.go +++ b/versiondb/tsrocksdb/store.go @@ -108,6 +108,7 @@ func (s Store) HasAtVersion(storeKey string, key []byte, version *int64) (bool, if err != nil { return false, err } + defer slice.Free() return slice.Exists(), nil }