mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-08-05 00:05:59 +08:00
replay: fix segfault caused by pointer usage after freeing (#28779)
old-commit-hash: aa85fed91d
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user