[icinga-checkins] icinga.org: icinga2/master: Fix null pointer dereference while parsing the config

git at icinga.org git at icinga.org
Thu Nov 13 23:26:23 CET 2014


Module: icinga2
Branch: master
Commit: 79fb24cedbdcc5a131a59581b87755edeee33789
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=79fb24cedbdcc5a131a59581b87755edeee33789

Author: Gunnar Beutner <gunnar.beutner at netways.de>
Date:   Thu Nov 13 23:25:52 2014 +0100

Fix null pointer dereference while parsing the config

---

 lib/config/configitem.cpp |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/config/configitem.cpp b/lib/config/configitem.cpp
index 26be1d8..2ac90c1 100644
--- a/lib/config/configitem.cpp
+++ b/lib/config/configitem.cpp
@@ -288,6 +288,9 @@ bool ConfigItem::ValidateItems(void)
 
 	upq.Join();
 
+	if (ConfigCompilerContext::GetInstance()->HasErrors())
+		return false;
+
 	std::vector<DynamicObject::Ptr> objects;
 	BOOST_FOREACH(const ItemMap::value_type& kv, m_Items) {
 		DynamicObject::Ptr object = kv.second->m_Object;



More information about the icinga-checkins mailing list