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

Diff of /monit/gc.c

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

revision 1.10 by martinp, Fri Nov 29 13:38:51 2002 UTC revision 1.11 by hauk, Thu Dec 19 20:50:06 2002 UTC
# Line 28  Line 28 
28    
29    
30  /* Private prototypes */  /* Private prototypes */
 static void _gcpl(Process_T*);  
31  static void _gcppl(Port_T*);  static void _gcppl(Port_T*);
32    static void _gcpl(Process_T*);
33  static void _gcpcl(Checksum_T*);  static void _gcpcl(Checksum_T*);
34  static void _gcpql(Resource_T*);  static void _gcpql(Resource_T*);
35  static void _gcppil(ProcInfo_T*);  static void _gcppil(ProcInfo_T*);
36  static void _gcptl(Timestamp_T*);  static void _gcptl(Timestamp_T*);
37    static void _gcpdl(Dependant_T *d);
38    
39    
40  /**  /**
# Line 55  void gc() { Line 56  void gc() {
56    
57    gc_protocols();    gc_protocols();
58    if(processlist) _gcpl(&processlist);    if(processlist) _gcpl(&processlist);
59    if(mygroup) free(mygroup);    if(Run.mygroup) free(Run.mygroup);
60        
61  }  }
62    
# Line 100  void gc_process(Process_T *p) { Line 101  void gc_process(Process_T *p) {
101    
102    }    }
103    
104      if((*p)->dependantlist) {
105        
106        _gcpdl(&(*p)->dependantlist);
107        
108      }
109    
110    free((*p)->name);    free((*p)->name);
111    free((*p)->pidfile);    free((*p)->pidfile);
112    free((*p)->group);    free((*p)->group);
# Line 221  static void _gcptl(Timestamp_T *p) { Line 228  static void _gcptl(Timestamp_T *p) {
228    
229  }  }
230    
231    
232    static void _gcpdl(Dependant_T *d) {
233    
234      if((*d)->next) {
235        
236        _gcpdl(&(*d)->next);
237        
238      }
239    
240      free((*d)->dependant);
241      free(*d);
242      *d= NULL;
243    
244    }

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

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