Hi Praveen
On 26/08/2016 10:19 PM, praveen malviya wrote: > Hi Gary, > > Thanks for the comments. > Please see responses inline with [Praveen] > > > Thanks, > Praveen > > >> +// GL: very similar version in d2nmsg.c. Also this isn't freeing the >> SaNameTs attrs.list > [Praveen] I did not get it completely. > The one in utils.cc is used by AMFD to free the message inside > avd_d2n_msg_dequeue() and other one that is present in d2nmsg.c is > used by AMFND to free the message. > In utils.cc: delete [] (compcsi->info.attrs.list) is already present. > In d2nmsg.c: AMFND will have to free memory allocated for extended > names names (if any) by leap. I mean since 'list' is of type AVSV_ATTR_NAME_VAL, the SaNameTs inside AVSV_ATTR_NAME_VAL are not freed. >> static void free_d2n_compcsi_info(AVSV_DND_MSG *compcsi_msg) { >> AVSV_D2N_COMPCSI_ASSIGN_MSG_INFO *compcsi = >> &compcsi_msg->msg_info.d2n_compcsi_assign_msg_info; >> >> @@ -2030,6 +2031,7 @@ >> /* Scan the list of attributes for the CSI and add it to the >> message */ >> while ((attr_ptr_db != nullptr) && >> (ptr_csiattr_msg->number < >> compcsi->csi->num_attributes)) { >> + // GL: AVSV_ATTR_NAME_VAL contains SaNameT. Does it need to >> be deep copied. > [Praveen] I got the same doubt while reviewing long dn patches because > same mechamism is being done in avd_prep_csi_attr_info() for existing > SUSI assign message. I thought it works because in case of long dn it > will copy reference to the longdn and in case of short dn it will copy > the original string. Since it is not freed in free_d2n_*() functions > original referenced string in CSI is never gets corrupted. > What do you think? Good point. We should fix avd_prep_csi_attr_info() too? I think there is a danger the original SaNameT will no longer be available, since these messages go into a queue that gets transmitted later? Thanks Gary ------------------------------------------------------------------------------ _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel