Fix rocksmq memleak (#8564)

Signed-off-by: fishpenguin <kun.yu@zilliz.com>
pull/8588/head
yukun 2021-09-26 15:31:56 +08:00 committed by GitHub
parent db2ff92ee6
commit 075d6880a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -634,7 +634,8 @@ func (rmq *rocksmq) Seek(topicName string, groupName string, msgID UniqueID) err
opts := gorocksdb.NewDefaultReadOptions()
defer opts.Destroy()
_, err = rmq.store.Get(opts, []byte(storeKey))
val, err := rmq.store.Get(opts, []byte(storeKey))
defer val.Free()
if err != nil {
log.Debug("RocksMQ: get " + storeKey + " failed")
return err