/[monit]/monit/gc.c
ViewVC logotype

Diff of /monit/gc.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.16 by hauk, Mon Feb 17 15:34:19 2003 UTC revision 1.17 by hauk, Wed Apr 30 23:24:22 2003 UTC
# Line 112  void gc_process(Process_T *p) { Line 112  void gc_process(Process_T *p) {
112    free((*p)->name);    free((*p)->name);
113    free((*p)->pidfile);    free((*p)->pidfile);
114    free((*p)->group);    free((*p)->group);
115      
116    if((*p)->start) {    if((*p)->start) {
117      for(i= 0; (*p)->start->arg[i]; i++)      for(i= 0; (*p)->start->arg[i]; i++)
118          free((*p)->start->arg[i]);          free((*p)->start->arg[i]);
119        for(i= 0; (*p)->start->env[i]; i++)
120            free((*p)->start->env[i]);
121      free((*p)->start);      free((*p)->start);
122    }    }
123      
124    if((*p)->stop) {    if((*p)->stop) {
125      for(i= 0; (*p)->stop->arg[i]; i++)      for(i= 0; (*p)->stop->arg[i]; i++)
126          free((*p)->stop->arg[i]);          free((*p)->stop->arg[i]);
127        for(i= 0; (*p)->stop->env[i]; i++)
128            free((*p)->stop->env[i]);
129      free((*p)->stop);      free((*p)->stop);
130    }    }
131      
132    (*p)->next= NULL;    (*p)->next= NULL;
133    
134    pthread_mutex_destroy(&(*p)->mutex);    pthread_mutex_destroy(&(*p)->mutex);

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26