Hi Gary,
        By the way, is this fix ok for you?

Thanks
-Nagu
> -----Original Message-----
> From: Nagendra Kumar
> Sent: 24 February 2017 12:41
> To: Gary Lee; [email protected]; Praveen Malviya;
> [email protected]
> Cc: [email protected]
> Subject: Re: [devel] [PATCH 1 of 1] amfd: fix null ptr accessing issue [#2322]
> 
> Sure. Anyway we are doing it based on bugs reported.
> 
> Thanks
> -Nagu
> 
> > -----Original Message-----
> > From: Gary Lee [mailto:[email protected]]
> > Sent: 24 February 2017 05:47
> > To: Nagendra Kumar; [email protected]; Praveen Malviya;
> > [email protected]
> > Cc: [email protected]
> > Subject: Re: [PATCH 1 of 1] amfd: fix null ptr accessing issue [#2322]
> >
> > Hi Nagu
> >
> > I guess the same problem occurs for many CCB completed handlers of AMF
> > entities.
> > Should we fix them too?
> >
> > Thanks
> > Gary
> >
> > On 23/2/17, 10:47 pm, "[email protected]"
> > <[email protected]> wrote:
> >
> >      src/amf/amfd/sutcomptype.cc |  12 +++++-------
> >      1 files changed, 5 insertions(+), 7 deletions(-)
> >
> >
> >     diff --git a/src/amf/amfd/sutcomptype.cc
> > b/src/amf/amfd/sutcomptype.cc
> >     --- a/src/amf/amfd/sutcomptype.cc
> >     +++ b/src/amf/amfd/sutcomptype.cc
> >     @@ -114,7 +114,6 @@ SaAisErrorT avd_sutcomptype_config_get(c
> >      static SaAisErrorT
> > sutcomptype_ccb_completed_cb(CcbUtilOperationData_t *opdata)
> >      {
> >             SaAisErrorT rc = SA_AIS_ERR_BAD_OPERATION;
> >     -       AVD_SUTCOMP_TYPE *sutcomptype = nullptr;
> >
> >             TRACE_ENTER2("CCB ID %llu, '%s'", opdata->ccbId,
> > osaf_extended_name_borrow(&opdata->objectName));
> >
> >     @@ -127,11 +126,7 @@ static SaAisErrorT sutcomptype_ccb_compl
> >                     report_ccb_validation_error(opdata, "Modification of
> > SaAmfSUType not supported");
> >                     break;
> >             case CCBUTIL_DELETE:
> >     -               sutcomptype = sutcomptype_db-
> > >find(Amf::to_string(&opdata->objectName));
> >     -               if (sutcomptype->curr_num_components == 0) {
> >     -                       rc = SA_AIS_OK;
> >     -                       opdata->userData = sutcomptype; /* Save for
> > later use in apply */
> >     -               }
> >     +               rc = SA_AIS_OK;
> >                     break;
> >             default:
> >                     osafassert(0);
> >     @@ -154,7 +149,10 @@ static void sutcomptype_ccb_apply_cb(Ccb
> >                     sutcomptype_db_add(sutcomptype);
> >                     break;
> >             case CCBUTIL_DELETE:
> >     -
> >     sutcomptype_delete(static_cast<AVD_SUTCOMP_TYPE*>(opdata-
> > >userData));
> >     +               sutcomptype = sutcomptype_db-
> > >find(Amf::to_string(&opdata->objectName));
> >     +               if (sutcomptype != nullptr) {
> >     +                       sutcomptype_delete(sutcomptype);
> >     +               }
> >                     break;
> >             default:
> >                     osafassert(0);
> >
> >
> >
> 
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most engaging
> tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> Opensaf-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/opensaf-devel

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to