[icinga-checkins] icinga.org: icinga2/master: Fix null pointer dereference in ConfigItem:: Commit().

git at icinga.org git at icinga.org
Mon Mar 11 13:47:37 CET 2013


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

Author: Gunnar Beutner <gunnar.beutner at netways.de>
Date:   Mon Mar 11 13:07:21 2013 +0100

Fix null pointer dereference in ConfigItem::Commit().

---

 lib/config/configitem.cpp |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/config/configitem.cpp b/lib/config/configitem.cpp
index b73778d..b966e4d 100644
--- a/lib/config/configitem.cpp
+++ b/lib/config/configitem.cpp
@@ -263,8 +263,10 @@ DynamicObject::Ptr ConfigItem::Commit(void)
 	/* Update or create the object and apply the configuration settings. */
 	bool was_null = false;
 
-	if (!dobj && !IsAbstract()) {
-		dobj = dtype->CreateObject(update);
+	if (!dobj) {
+		if (!IsAbstract())
+			dobj = dtype->CreateObject(update);
+
 		was_null = true;
 	}
 





More information about the icinga-checkins mailing list