Changeset 4727

Show
Ignore:
Timestamp:
08/26/07 23:20:55 (6 years ago)
Author:
khali
Message:

Fix a memory leak on error when printing an unknown chip.

Location:
lm-sensors/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/CHANGES

    r4660 r4727  
    99  Module i2c-piix4: Add ATI SB700 support (2.6 backport) 
    1010  Module lm93: Fix an array overrun (2.6 backport) 
     11  Program sensors: Fix a memory leak on error (with -u) 
    1112  Program sensors-detect: Don't probe i2c-isa as a regular i2c bus 
    1213                          Add Winbond W83L786NR/NG/R/G detection 
  • lm-sensors/trunk/prog/sensors/chips.c

    r4722 r4727  
    62696269      continue; 
    62706270    } 
    6271     if (! valid) 
     6271    if (!valid) { 
     6272      free(label); 
    62726273      continue; 
     6274    } 
    62736275    if (data->mode & SENSORS_MODE_R) { 
    6274       if(sensors_get_feature(*name,data->number,&val)) { 
     6276      if(sensors_get_feature(*name,data->number,&val)) 
    62756277        printf("ERROR: Can't get feature `%s' data!\n",data->name); 
    6276         continue; 
    6277       } 
    6278       if (data->mapping != SENSORS_NO_MAPPING) 
     6278      else if (data->mapping != SENSORS_NO_MAPPING) 
    62796279        printf("  %s: %.2f (%s)\n",label,val,data->name); 
    62806280      else