The commit message is not OK! Are you introducing new memory leaks or what?
Anders Widell wrote up some good comments on the topic. /Hans On 01/08/2014 03:26 PM, [email protected] wrote: > osaf/libs/core/leap/sysf_mem.c | 1 + > osaf/libs/core/mbcsv/mbcsv_util.c | 12 ++++++++++-- > 2 files changed, 11 insertions(+), 2 deletions(-) > > > diff --git a/osaf/libs/core/leap/sysf_mem.c b/osaf/libs/core/leap/sysf_mem.c > --- a/osaf/libs/core/leap/sysf_mem.c > +++ b/osaf/libs/core/leap/sysf_mem.c > @@ -426,6 +426,7 @@ USRBUF *sysf_alloc_pkt(unsigned char poo > m_PMGR_LK(&gl_ub_pool_mgr.lock); > > if (pool_id >= UB_MAX_POOLS) { > + m_NCS_MEM_FREE(ub, NCS_MEM_REGION_IO_DATA_HDR, > NCS_SERVICE_ID_OS_SVCS, 2); > m_PMGR_UNLK(&gl_ub_pool_mgr.lock); > m_LEAP_DBG_SINK(0); > return NULL; > diff --git a/osaf/libs/core/mbcsv/mbcsv_util.c > b/osaf/libs/core/mbcsv/mbcsv_util.c > --- a/osaf/libs/core/mbcsv/mbcsv_util.c > +++ b/osaf/libs/core/mbcsv/mbcsv_util.c > @@ -340,6 +340,7 @@ uint32_t mbcsv_send_ckpt_data_to_all_pee > NCS_UBAID *uba = NULL; > USRBUF *dup_ub = NULL; > MBCSV_EVT evt_msg; > + uint32_t rc = NCSCC_RC_SUCCESS; > TRACE_ENTER(); > > if (NULL == ckpt_inst->peer_list) { > @@ -460,7 +461,7 @@ uint32_t mbcsv_send_ckpt_data_to_all_pee > switch (msg_to_send->i_send_type) { > case NCS_MBCSV_SND_SYNC: > { > - > m_NCS_MBCSV_MDS_SYNC_SEND(&evt_msg, > + rc = > m_NCS_MBCSV_MDS_SYNC_SEND(&evt_msg, > > tmp_ptr->my_ckpt_inst, tmp_ptr->peer_anchor); > } > break; > @@ -468,15 +469,22 @@ uint32_t mbcsv_send_ckpt_data_to_all_pee > case NCS_MBCSV_SND_USR_ASYNC: > case NCS_MBCSV_SND_MBC_ASYNC: > { > - > m_NCS_MBCSV_MDS_ASYNC_SEND(&evt_msg, > + rc = > m_NCS_MBCSV_MDS_ASYNC_SEND(&evt_msg, > > tmp_ptr->my_ckpt_inst, tmp_ptr->peer_anchor); > } > break; > default: > + m_MMGR_FREE_BUFR_LIST(dup_ub); > TRACE_LEAVE2("unsupported send type"); > return NCSCC_RC_FAILURE; > } > tmp_ptr->ckpt_msg_sent = true; > + /* In failure scenario, there is a chance that > MDS may not free dup_ub */ > + if (rc != NCSCC_RC_SUCCESS) > + { > + TRACE_LEAVE2("MBCSv SEND Failed"); > + m_MMGR_FREE_BUFR_LIST(dup_ub); > + } > } > tmp_ptr = tmp_ptr->next; > } > > ------------------------------------------------------------------------------ > Rapidly troubleshoot problems before they affect your business. Most IT > organizations don't have a clear picture of how application performance > affects their revenue. With AppDynamics, you get 100% visibility into your > Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! > http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk > _______________________________________________ > Opensaf-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/opensaf-devel > > ------------------------------------------------------------------------------ CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments & Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk _______________________________________________ Opensaf-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensaf-devel
