mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Fix memory leaks in various input framework error-handling cases
This commit is contained in:
parent
3b6a2a5f4e
commit
6f5f7df970
1 changed files with 5 additions and 0 deletions
|
@ -444,6 +444,7 @@ bool Manager::CreateEventStream(RecordVal* fval)
|
||||||
if ( status )
|
if ( status )
|
||||||
{
|
{
|
||||||
reporter->Error("Input stream %s: Problem unrolling", stream_name.c_str());
|
reporter->Error("Input stream %s: Problem unrolling", stream_name.c_str());
|
||||||
|
for ( auto& f : fieldsV ) delete f;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -453,6 +454,7 @@ bool Manager::CreateEventStream(RecordVal* fval)
|
||||||
if ( ! res )
|
if ( ! res )
|
||||||
{
|
{
|
||||||
delete stream;
|
delete stream;
|
||||||
|
for ( auto& f : fieldsV ) delete f;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -671,6 +673,7 @@ bool Manager::CreateTableStream(RecordVal* fval)
|
||||||
if ( (valfields > 1) && (want_record->InternalInt() != 1) )
|
if ( (valfields > 1) && (want_record->InternalInt() != 1) )
|
||||||
{
|
{
|
||||||
reporter->Error("Input stream %s: Stream does not want a record (want_record=F), but has more then one value field.", stream_name.c_str());
|
reporter->Error("Input stream %s: Stream does not want a record (want_record=F), but has more then one value field.", stream_name.c_str());
|
||||||
|
for ( auto& f : fieldsV ) delete f;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -680,6 +683,7 @@ bool Manager::CreateTableStream(RecordVal* fval)
|
||||||
if ( status )
|
if ( status )
|
||||||
{
|
{
|
||||||
reporter->Error("Input stream %s: Problem unrolling", stream_name.c_str());
|
reporter->Error("Input stream %s: Problem unrolling", stream_name.c_str());
|
||||||
|
for ( auto& f : fieldsV ) delete f;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -689,6 +693,7 @@ bool Manager::CreateTableStream(RecordVal* fval)
|
||||||
if ( ! res )
|
if ( ! res )
|
||||||
{
|
{
|
||||||
delete stream;
|
delete stream;
|
||||||
|
for ( auto& f : fieldsV ) delete f;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue