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
@@ -301,6 +301,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) {
------------------------------------------------------------------------------
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel