]> granicus.if.org Git - icinga2/commitdiff
Fix null pointer dereference in ConfigItem::Commit().
authorGunnar Beutner <gunnar.beutner@netways.de>
Mon, 11 Mar 2013 12:07:21 +0000 (13:07 +0100)
committerGunnar Beutner <gunnar.beutner@netways.de>
Mon, 11 Mar 2013 12:07:21 +0000 (13:07 +0100)
lib/config/configitem.cpp

index b73778da868c982138db072a2381578adaadf482..b966e4dc50d376034a121f572bd35f10854adba3 100644 (file)
@@ -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;
        }