osaf/services/saf/amf/amfd/nodegroup.cc |  4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)


Currently, if a nodegroup and a member node is created in the same CCB, and
the nodegroup is modified to include this new node, amfd will crash.

This change will reject the change instead of trying to deference a null 'ng'.
Perhaps support for this use case can be added later.

diff --git a/osaf/services/saf/amf/amfd/nodegroup.cc 
b/osaf/services/saf/amf/amfd/nodegroup.cc
--- a/osaf/services/saf/amf/amfd/nodegroup.cc
+++ b/osaf/services/saf/amf/amfd/nodegroup.cc
@@ -302,6 +302,10 @@
        TRACE_ENTER();
 
        ng = avd_ng_get(&opdata->objectName);
+       if (ng == NULL) {
+               report_ccb_validation_error(opdata, "ng modify: nodegroup 
cannot be found");
+               goto done;
+       }
 
        while ((mod = opdata->param.modify.attrMods[i++]) != NULL) {
                if (mod->modType == SA_IMM_ATTR_VALUES_REPLACE) {

------------------------------------------------------------------------------
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to