Hi Hans I think the success case should be OK. cbk_info is freed when avnd_msg_content_free() is called elsewhere (avnd_mds_flat_enc?) for the successful case. The bit of code I removed was only getting called when 'NCSCC_RC_SUCCESS != rc'.
I agree with your second comment. Setting it to 0 is unnecessary. I'll remove this. Thanks Gary On 21/04/15 20:47, Hans Nordebäck wrote: > Hi Gary, > > two questions, in avnd_msg_content_free it seems that the cbk_info is > not freed if msg->info.ava == 0, > it is set to 0 when avnd_mds_send succeeds, so it will not be freed as > that code now has been removed? > The cbk_info is a local variable so it shouldn't be necessary to set > it to 0. > > /Thanks HansN > On 04/21/2015 03:23 AM, Gary Lee wrote: >> osaf/services/saf/amf/amfnd/pg.cc | 3 --- >> osaf/services/saf/amf/amfnd/util.cc | 1 + >> 2 files changed, 1 insertions(+), 3 deletions(-) >> >> >> cbk_info is already freed in avnd_pg_cbk_msg_send(). There is >> no need to free it again. >> >> diff --git a/osaf/services/saf/amf/amfnd/pg.cc >> b/osaf/services/saf/amf/amfnd/pg.cc >> --- a/osaf/services/saf/amf/amfnd/pg.cc >> +++ b/osaf/services/saf/amf/amfnd/pg.cc >> @@ -784,9 +784,6 @@ >> /* reset the is_syn flag */ >> trk->info.is_syn = false; >> - if ((NCSCC_RC_SUCCESS != rc) && cbk_info) >> - amf_cbk_free(cbk_info); >> - >> TRACE_LEAVE2("rc '%u'", rc); >> return rc; >> } >> diff --git a/osaf/services/saf/amf/amfnd/util.cc >> b/osaf/services/saf/amf/amfnd/util.cc >> --- a/osaf/services/saf/amf/amfnd/util.cc >> +++ b/osaf/services/saf/amf/amfnd/util.cc >> @@ -638,6 +638,7 @@ >> /* free the cbk-info ptr */ >> delete cbk_info; >> + cbk_info = NULL; >> return; >> } > ------------------------------------------------------------------------------ BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT Develop your own process in accordance with the BPMN 2 standard Learn Process modeling best practices with Bonita BPM through live exercises http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_ source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel