mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-10-27 12:30:43 +00:00
Fix a memory leak on error when printing an unknown chip.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4727 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
c575eb9f90
commit
984ebb419f
2 files changed
+6
-5
No files matched your search
@@ -8,6 +8,7 @@ SVN HEAD
|
||||
Module fscher: Add missing read of control register (2.6 backport)
|
||||
Module i2c-piix4: Add ATI SB700 support (2.6 backport)
|
||||
Module lm93: Fix an array overrun (2.6 backport)
|
||||
Program sensors: Fix a memory leak on error (with -u)
|
||||
Program sensors-detect: Don't probe i2c-isa as a regular i2c bus
|
||||
Add Winbond W83L786NR/NG/R/G detection
|
||||
Add Winbond W83L771W/G detection
|
||||
|
||||
@@ -6268,14 +6268,14 @@ void print_unknown_chip(const sensors_chip_name *name)
|
||||
printf("ERROR: Can't get feature `%s' label!\n", data->name);
|
||||
continue;
|
||||
}
|
||||
if (! valid)
|
||||
if (!valid) {
|
||||
free(label);
|
||||
continue;
|
||||
}
|
||||
if (data->mode & SENSORS_MODE_R) {
|
||||
if(sensors_get_feature(*name,data->number,&val)) {
|
||||
if(sensors_get_feature(*name,data->number,&val))
|
||||
printf("ERROR: Can't get feature `%s' data!\n",data->name);
|
||||
continue;
|
||||
}
|
||||
if (data->mapping != SENSORS_NO_MAPPING)
|
||||
else if (data->mapping != SENSORS_NO_MAPPING)
|
||||
printf(" %s: %.2f (%s)\n",label,val,data->name);
|
||||
else
|
||||
printf("%s: %.2f (%s)\n",label,val,data->name);
|
||||
|
||||
Reference in new issue
Block a user