ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/libstatgrab/src/libstatgrab/load_stats.c
(Generate patch)

Comparing projects/libstatgrab/src/libstatgrab/load_stats.c (file contents):
Revision 1.18 by tdb, Sat Sep 24 13:29:22 2005 UTC vs.
Revision 1.19 by tdb, Mon Oct 9 14:09:38 2006 UTC

# Line 73 | Line 73 | sg_load_stats *sg_get_load_stats(){
73  
74          if((ksp=kstat_lookup(kc, "unix", 0, "system_misc")) == NULL){
75                  sg_set_error(SG_ERROR_KSTAT_LOOKUP, "unix,0,system_misc");
76 +                kstat_close(kc);
77                  return NULL;
78          }
79  
80          if (kstat_read(kc, ksp, 0) == -1) {
81                  sg_set_error(SG_ERROR_KSTAT_READ, NULL);
82 +                kstat_close(kc);
83                  return NULL;
84          }
85 +
86 +        kstat_close(kc);
87  
88          if((kn=kstat_data_lookup(ksp, "avenrun_1min")) == NULL){
89                  sg_set_error(SG_ERROR_KSTAT_DATA_LOOKUP, "avenrun_1min");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines