diff --git a/pkg/core/storage/boltdb_store.go b/pkg/core/storage/boltdb_store.go index feb0718ea..3f6bfe233 100644 --- a/pkg/core/storage/boltdb_store.go +++ b/pkg/core/storage/boltdb_store.go @@ -61,6 +61,12 @@ func (s *BoltDBStore) Get(key []byte) (val []byte, err error) { err = s.db.View(func(tx *bbolt.Tx) error { b := tx.Bucket(Bucket) val = b.Get(key) + // Value from Get is only valid for the lifetime of transaction, #1482 + if val != nil { + var valcopy = make([]byte, len(val)) + copy(valcopy, val) + val = valcopy + } return nil }) if val == nil {