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

Diff of /monit/gc.c

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

revision 1.9 by chopp, Fri Sep 27 09:52:29 2002 UTC revision 1.10 by martinp, Fri Nov 29 13:38:51 2002 UTC
# Line 33  static void _gcppl(Port_T*); Line 33  static void _gcppl(Port_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*);
37    
38    
39  /**  /**
40   *  Release allocated memory.   *  Release allocated memory.
41   *   *
42   *  @author Jan-Henrik Haukeland, <hauk@tildeslash.com>   *  @author Jan-Henrik Haukeland, <hauk@tildeslash.com>
43     *  @author Martin Pala, <martin.pala@hq.iol.cz>
44   *   *
45   *  @version \$Id$   *  @version \$Id$
46   *   *
# Line 92  void gc_process(Process_T *p) { Line 94  void gc_process(Process_T *p) {
94    
95    }    }
96        
97      if((*p)->timestamplist) {
98        
99        _gcptl(&(*p)->timestamplist);
100    
101      }
102    
103    free((*p)->name);    free((*p)->name);
104    free((*p)->pidfile);    free((*p)->pidfile);
105    free((*p)->group);    free((*p)->group);
# Line 197  static void _gcppil(ProcInfo_T *pi) { Line 205  static void _gcppil(ProcInfo_T *pi) {
205    *pi= NULL;    *pi= NULL;
206    
207  }  }
208    
209    
210    static void _gcptl(Timestamp_T *p) {
211      
212      if((*p)->next) {
213        
214        _gcptl(&(*p)->next);
215        
216      }
217    
218      free((*p)->pathname);
219      free(*p);
220      *p= NULL;
221    
222    }
223    

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

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