leveldb
leveldb copied to clipboard
The memory is used after released ??
Hi all, This is Qianxin CodeSafe Team, we found a suspicious issue, at https://github.com/google/leveldb/blob/23e35d792b9154f922b8b575b12596a4d8664c65/util/cache.cc#L316 Element "e" is used at https://github.com/google/leveldb/blob/23e35d792b9154f922b8b575b12596a4d8664c65/util/cache.cc#L314 however,function “Unref” is defined at https://github.com/google/leveldb/blob/23e35d792b9154f922b8b575b12596a4d8664c65/util/cache.cc#L226 where has freed e's memory
e is not de-referenced, so any freed memory is not used. The return usage signals that the if condition was entered during FinishErase.