mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 08:38:20 +00:00
logging/Manager: Fix coverity null-deref
Prior code assumed non-null stream given the active_write_ctx matches, but please coverity.
This commit is contained in:
parent
bc0f85caa8
commit
52fba4aacf
1 changed files with 2 additions and 0 deletions
|
@ -1207,6 +1207,8 @@ ValPtr Manager::Delay(const EnumValPtr& id, const RecordValPtr record, FuncPtr p
|
||||||
|
|
||||||
ValPtr token_val;
|
ValPtr token_val;
|
||||||
Stream* stream = FindStream(id.get());
|
Stream* stream = FindStream(id.get());
|
||||||
|
if ( ! stream )
|
||||||
|
return make_intrusive<detail::LogDelayTokenVal>();
|
||||||
|
|
||||||
if ( const auto& delay_info = stream->GetDelayInfo(active_write_ctx); delay_info ) {
|
if ( const auto& delay_info = stream->GetDelayInfo(active_write_ctx); delay_info ) {
|
||||||
// Previously delayed, return the same token to script-land.
|
// Previously delayed, return the same token to script-land.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue