replay: fix segfault caused by pointer usage after freeing (#28779)

This commit is contained in:
Qi Liu
2023-07-01 23:01:47 -07:00
committed by GitHub
parent 6495a18cc9
commit aa85fed91d
+1 -1
View File
@@ -74,8 +74,8 @@ bool LogReader::parse(const std::set<cereal::Event::Which> &allow, std::atomic<b
Event *evt = new Event(words);
#endif
if (!allow.empty() && allow.find(evt->which) == allow.end()) {
delete evt;
words = kj::arrayPtr(evt->reader.getEnd(), words.end());
delete evt;
continue;
}