From: Jiří Filipovič Date: Tue, 3 Jun 2008 10:54:49 +0000 (+0000) Subject: Memory leaks removed. X-Git-Tag: glite-yaim-lb_R_4_0_3_1~20 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=1ad0c3e4cc7c41f7aa1a6a64b4f465d189c478c7;p=jra1mw.git Memory leaks removed. --- diff --git a/org.glite.lb.state-machine/src/lb_plugin.c b/org.glite.lb.state-machine/src/lb_plugin.c index 833085f..fc5884b 100644 --- a/org.glite.lb.state-machine/src/lb_plugin.c +++ b/org.glite.lb.state-machine/src/lb_plugin.c @@ -308,6 +308,7 @@ static int lb_close(void *fpctx,void *handle) { free (h->fullStatusHistory[i]); i++; } + free(h->fullStatusHistory); h->fullStatusHistory = NULL; h->lastStatusHistory = NULL; h->finalStatus = NULL; @@ -1677,11 +1678,13 @@ static int lb_status(void *handle) { // not very clean, but working memset(&js->pub, 0, sizeof(edg_wll_JobStat)); destroy_intJobStat(js); + free(js); return 0; err: destroy_intJobStat(js); + free(js); return -1; } diff --git a/org.glite.lb.state-machine/src/process_event_pbs.c b/org.glite.lb.state-machine/src/process_event_pbs.c index 9389c2f..64992ef 100644 --- a/org.glite.lb.state-machine/src/process_event_pbs.c +++ b/org.glite.lb.state-machine/src/process_event_pbs.c @@ -210,13 +210,13 @@ int processEvent_PBS(intJobStat *js, edg_wll_Event *e, int ev_seq, int strict, c /* XXX : just debug output - remove */ - printf("processEvent_PBS(): %s (%s), state: %s --> %s\n ", + /*printf("processEvent_PBS(): %s (%s), state: %s --> %s\n ", edg_wll_EventToString(e->any.type), (res == RET_LATE) ? "RET_LATE" : "RET_OK", edg_wll_StatToString(old_state), edg_wll_StatToString(js->pub.state) ); printf("\t%s\n",e->any.seqcode); - printf("\t(last=%s)\n",js->last_seqcode); + printf("\t(last=%s)\n",js->last_seqcode);*/ /*----------------------------------*/