From 0029bc30b7fa932f2970084ec79c5d4a11be4add Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Mon, 11 Mar 2013 13:07:21 +0100 Subject: [PATCH] Fix null pointer dereference in ConfigItem::Commit(). --- lib/config/configitem.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/config/configitem.cpp b/lib/config/configitem.cpp index b73778da8..b966e4dc5 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; } -- 2.40.0