ACK, -AVM
On 8/5/2016 1:16 PM, Vu Minh Nguyen wrote: > osaf/libs/agents/saf/lga/lga_api.c | 3 ++- > osaf/libs/agents/saf/lga/lga_state.c | 2 +- > 2 files changed, 3 insertions(+), 2 deletions(-) > > > Not initilize the global pointer variable `client_list`. It might refer to an > invalid/unallocated memory. If it is the case, the application will be > crashed. > > This patch does initialize. > > diff --git a/osaf/libs/agents/saf/lga/lga_api.c > b/osaf/libs/agents/saf/lga/lga_api.c > --- a/osaf/libs/agents/saf/lga/lga_api.c > +++ b/osaf/libs/agents/saf/lga/lga_api.c > @@ -42,7 +42,8 @@ > /* The main controle block */ > lga_cb_t lga_cb = { > .cb_lock = PTHREAD_MUTEX_INITIALIZER, > - .lgs_state = LGS_START > + .lgs_state = LGS_START, > + .client_list = NULL > }; > > static bool is_well_know_stream(const char* dn) > diff --git a/osaf/libs/agents/saf/lga/lga_state.c > b/osaf/libs/agents/saf/lga/lga_state.c > --- a/osaf/libs/agents/saf/lga/lga_state.c > +++ b/osaf/libs/agents/saf/lga/lga_state.c > @@ -359,7 +359,7 @@ static void *recovery2_thread(void *dumm > lga_client_hdl_rec_t *p_client; > p_client = lga_cb.client_list; > > - while (p_client != NULL) { > + while (p_client != NULL && p_client->recovered_flag == false) { > /* Exit if requested to */ > rc = osaf_poll_one_fd(state2_terminate_sel_obj.rmv_obj, 0); > if (rc > 0) { ------------------------------------------------------------------------------ What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. http://sdm.link/zohodev2dev _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel