1
0
mirror of https://github.com/Icinga/icinga2.git synced 2025-04-07 20:25:08 +02:00

Fix race condition in ConfigWriter::GetKeywords

fixes 
This commit is contained in:
Gunnar Beutner 2015-11-03 09:46:45 +01:00
parent 98e5492a40
commit ae23e456a6

@ -212,6 +212,8 @@ String ConfigWriter::EscapeIcingaString(const String& str)
const std::vector<String>& ConfigWriter::GetKeywords(void)
{
static std::vector<String> keywords;
static boost::mutex mutex;
boost::mutex::scoped_lock lock(mutex);
if (keywords.empty()) {
keywords.push_back("object");