diff --git a/src/file_analysis/AnalyzerSet.cc b/src/file_analysis/AnalyzerSet.cc index ed8b440e35..35968c9a02 100644 --- a/src/file_analysis/AnalyzerSet.cc +++ b/src/file_analysis/AnalyzerSet.cc @@ -131,8 +131,9 @@ bool AnalyzerSet::Remove(file_analysis::Tag tag, HashKey* key) a->Done(); - // We don't delete the analyze object right here because the remove - // operation may execute when that will still be accessed. + // We don't delete the analyzer object right here because the remove + // operation may execute at a time when it can still be accessed. + // Instead we let the file know to delete the analyzer later. file->DoneWithAnalyzer(a); return true; diff --git a/src/file_analysis/File.h b/src/file_analysis/File.h index ea88692e8d..c799907a8f 100644 --- a/src/file_analysis/File.h +++ b/src/file_analysis/File.h @@ -292,7 +292,7 @@ protected: bool postpone_timeout; /**< Whether postponing timeout is requested. */ bool done; /**< If this object is about to be deleted. */ AnalyzerSet analyzers; /**< A set of attached file analyzers. */ - std::list done_analyzers; /**< Analyzers we're done with, remembered here until they be safely deleted. */ + std::list done_analyzers; /**< Analyzers we're done with, remembered here until they can be safely deleted. */ struct BOF_Buffer { BOF_Buffer() : full(false), size(0) {}