Memory leaks removed.
authorJiří Filipovič <fila@ics.muni.cz>
Tue, 3 Jun 2008 10:54:49 +0000 (10:54 +0000)
committerJiří Filipovič <fila@ics.muni.cz>
Tue, 3 Jun 2008 10:54:49 +0000 (10:54 +0000)
org.glite.lb.state-machine/src/lb_plugin.c
org.glite.lb.state-machine/src/process_event_pbs.c

index 833085f..fc5884b 100644 (file)
@@ -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;
 }
 
index 9389c2f..64992ef 100644 (file)
@@ -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);*/
 
 /*----------------------------------*/