mirror of
https://github.com/lm-sensors/lm-sensors
synced 2025-09-02 07:15:39 +00:00
Fix error path on library initialization error. Only call fclose() if
we have actually opened a configuration file before. git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5090 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1
CHANGES
1
CHANGES
@@ -11,6 +11,7 @@ SVN
|
|||||||
sensord: Fix rrd support (#2276)
|
sensord: Fix rrd support (#2276)
|
||||||
Use the same colors for daily and weekly charts
|
Use the same colors for daily and weekly charts
|
||||||
Drop workaround needed by old versions of rrdtool
|
Drop workaround needed by old versions of rrdtool
|
||||||
|
sensors: Fix error path on library initialization error
|
||||||
sensors.conf.eg: Fix voltage value references (g520sm, lm80, pc87366)
|
sensors.conf.eg: Fix voltage value references (g520sm, lm80, pc87366)
|
||||||
sensors-detect: Drop PCA9540 detection
|
sensors-detect: Drop PCA9540 detection
|
||||||
Improve sysconfig and modprobe.d integration
|
Improve sysconfig and modprobe.d integration
|
||||||
|
@@ -105,7 +105,8 @@ static int read_config_file(const char *config_file_name)
|
|||||||
err = sensors_init(config_file);
|
err = sensors_init(config_file);
|
||||||
if (err) {
|
if (err) {
|
||||||
fprintf(stderr, "sensors_init: %s\n", sensors_strerror(err));
|
fprintf(stderr, "sensors_init: %s\n", sensors_strerror(err));
|
||||||
fclose(config_file);
|
if (config_file)
|
||||||
|
fclose(config_file);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user