Changeset 5747 for lm-sensors/trunk/lib/access.c
- Timestamp:
- 06/30/09 22:47:53 (4 years ago)
- Files:
-
- 1 modified
-
lm-sensors/trunk/lib/access.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lm-sensors/trunk/lib/access.c
r5674 r5747 179 179 for (i = 0; i < chip->labels_count; i++) 180 180 if (!strcmp(feature->name, chip->labels[i].name)) { 181 label = strdup(chip->labels[i].value);181 label = chip->labels[i].value; 182 182 goto sensors_get_label_exit; 183 183 } … … 192 192 /* i - 1 to strip the '\n' at the end */ 193 193 buf[i - 1] = 0; 194 label = strdup(buf);194 label = buf; 195 195 goto sensors_get_label_exit; 196 196 } … … 198 198 199 199 /* No label, return the feature name instead */ 200 label = strdup(feature->name);200 label = feature->name; 201 201 202 202 sensors_get_label_exit: 203 label = strdup(label); 203 204 if (!label) 204 205 sensors_fatal_error(__func__, "Allocating label text");
