Changeset 5090

Show
Ignore:
Timestamp:
01/05/08 10:14:28 (5 years ago)
Author:
khali
Message:

Fix error path on library initialization error. Only call fclose() if
we have actually opened a configuration file before.

Location:
lm-sensors/branches/lm-sensors-3.0.0
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/branches/lm-sensors-3.0.0/CHANGES

    r5082 r5090  
    1212           Use the same colors for daily and weekly charts 
    1313           Drop workaround needed by old versions of rrdtool 
     14  sensors: Fix error path on library initialization error 
    1415  sensors.conf.eg: Fix voltage value references (g520sm, lm80, pc87366) 
    1516  sensors-detect: Drop PCA9540 detection 
  • lm-sensors/branches/lm-sensors-3.0.0/prog/sensors/main.c

    r4986 r5090  
    106106        if (err) { 
    107107                fprintf(stderr, "sensors_init: %s\n", sensors_strerror(err)); 
    108                 fclose(config_file); 
     108                if (config_file) 
     109                        fclose(config_file); 
    109110                return 1; 
    110111        }