Hi Alex,
 
Thanks for your comment.
I have incorporated the change and floated again as version 2.
 
Thanks,
Meenakshi
High Availability Solutions Pvt. Ltd.
www.hasolutions.in
 
 
--------- Original Message --------- Subject: Re: [PATCH 1/1] plmd: correct 
null pointer issues when deleting plm entities [#209]
From: "Jones, Alex" <[email protected]>
Date: 9/25/18 8:04 pm
To: "Meenakshi TK" <[email protected]>, "[email protected]" 
<[email protected]>
Cc: "[email protected]" <[email protected]>

 Hi Meenakshi,
     Good work! I just have one comment: instead of "goto" and the "end" label, 
just use "break". You are already inside the switch statement.
 Alex
 
 On 09/25/2018 08:01 AM, Meenakshi TK wrote:
NOTICE: This email was received from an EXTERNAL sender

 ---
 src/plm/plmd/plms_imm.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
 
 diff --git a/src/plm/plmd/plms_imm.c b/src/plm/plmd/plms_imm.c
 index 9fbba6c..bfdba45 100644
 --- a/src/plm/plmd/plms_imm.c
 +++ b/src/plm/plmd/plms_imm.c
 @@ -12,7 +12,7 @@
 * licensing terms.
 *
 * Author(s): Emerson Network Power
 - *
 + * High Availability Solutions Pvt Ltd
 */
 
 /*****************************************************************************
 @@ -600,10 +600,10 @@ void plms_modify_objects(SaInt32T obj_type, SaNameT 
*obj_name,
 }
 static void plms_delete_objects(SaInt32T obj_type, SaNameT *obj_name)
 {
 - PLMS_GROUP_ENTITY *child_list, *temp;
 + PLMS_GROUP_ENTITY *child_list = NULL, *temp;
 PLMS_ENTITY *plm_ent, *parent, *tmp;
 SaUint32T rc;
 - TRACE_ENTER();
 + TRACE_ENTER2("%s", obj_name->value);
 switch (obj_type) {
 case PLMS_HE_OBJ_TYPE:
 case PLMS_EE_OBJ_TYPE:
 @@ -612,6 +612,10 @@ static void plms_delete_objects(SaInt32T obj_type, 
SaNameT *obj_name)
 &plms_cb->entity_info, (SaUint8T *)obj_name);
 /* No need to check if plm_ent is null */
 /* Update the parent/child relationship */
 + if (plm_ent == NULL) {
 + TRACE_2("%s not found", obj_name->value);
 + goto end;
 + }
 parent = plm_ent->parent;
 if (parent == NULL) {
 /* Parent is domain object */
 @@ -686,6 +690,7 @@ static void plms_delete_objects(SaInt32T obj_type, SaNameT 
*obj_name)
 plms_delete_vm_obj(obj_name);
 break;
 }
 +end:
 TRACE_LEAVE();
 }
 static SaAisErrorT plms_imm_ccb_obj_create_cbk(SaImmOiHandleT imm_oi_hdl,
 -- 
 2.7.4

_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to