mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-10-24 12:04:33 +00:00
Fix a memory leak on library initialization error.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4972 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
c5549ba2ed
commit
580becd20b
2 files changed
+5
-3
No files matched your search
@@ -31,7 +31,7 @@ SVN HEAD
|
||||
Add w83793 support
|
||||
Log the error code on failure
|
||||
Add lm87 support
|
||||
Program sensors: Fix a memory leak on error (with -u)
|
||||
Program sensors: Fix a memory leaks on error
|
||||
Add sch311x support
|
||||
Hide error on missing dme1737 fan and pwm
|
||||
Add thmc50/adm1022 support
|
||||
|
||||
+4
-2
@@ -229,16 +229,18 @@ int main (int argc, char *argv[])
|
||||
}
|
||||
|
||||
open_config_file(config_file_name);
|
||||
if ((res = sensors_init(config_file))) {
|
||||
res = sensors_init(config_file);
|
||||
close_config_file(config_file_name);
|
||||
if (res) {
|
||||
fprintf(stderr,"%s\n",sensors_strerror(res));
|
||||
if (res == -SENSORS_ERR_PROC)
|
||||
fprintf(stderr,
|
||||
"Kernel interface access error\n"
|
||||
"For 2.6 kernels, make sure you have mounted sysfs and libsensors\n"
|
||||
"was compiled with sysfs support!\n");
|
||||
sensors_cleanup();
|
||||
exit(1);
|
||||
}
|
||||
close_config_file(config_file_name);
|
||||
|
||||
/* build the degrees string */
|
||||
set_degstr();
|
||||
|
||||
Reference in new issue
Block a user