diff --git a/src/input/Manager.cc b/src/input/Manager.cc index 44b819f04d..cbfa4086d9 100644 --- a/src/input/Manager.cc +++ b/src/input/Manager.cc @@ -444,6 +444,7 @@ bool Manager::CreateEventStream(RecordVal* fval) if ( status ) { reporter->Error("Input stream %s: Problem unrolling", stream_name.c_str()); + for ( auto& f : fieldsV ) delete f; return false; } @@ -453,6 +454,7 @@ bool Manager::CreateEventStream(RecordVal* fval) if ( ! res ) { delete stream; + for ( auto& f : fieldsV ) delete f; return false; } @@ -671,6 +673,7 @@ bool Manager::CreateTableStream(RecordVal* fval) 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()); + for ( auto& f : fieldsV ) delete f; return false; } @@ -680,6 +683,7 @@ bool Manager::CreateTableStream(RecordVal* fval) if ( status ) { reporter->Error("Input stream %s: Problem unrolling", stream_name.c_str()); + for ( auto& f : fieldsV ) delete f; return false; } @@ -689,6 +693,7 @@ bool Manager::CreateTableStream(RecordVal* fval) if ( ! res ) { delete stream; + for ( auto& f : fieldsV ) delete f; return false; } }