From ae23e456a62c4a1e424a0b6d1db78bb2a84203f9 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Tue, 3 Nov 2015 09:46:45 +0100 Subject: [PATCH] Fix race condition in ConfigWriter::GetKeywords fixes #10518 --- lib/base/configwriter.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/base/configwriter.cpp b/lib/base/configwriter.cpp index cc58ecdee..1f4eecd88 100644 --- a/lib/base/configwriter.cpp +++ b/lib/base/configwriter.cpp @@ -212,6 +212,8 @@ String ConfigWriter::EscapeIcingaString(const String& str) const std::vector& ConfigWriter::GetKeywords(void) { static std::vector keywords; + static boost::mutex mutex; + boost::mutex::scoped_lock lock(mutex); if (keywords.empty()) { keywords.push_back("object");