Changeset 5661
- Timestamp:
- 02/20/09 11:56:52 (4 years ago)
- Location:
- lm-sensors/trunk/lib
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
lm-sensors/trunk/lib/init.c
r5656 r5661 54 54 if (locale) { 55 55 locale = strdup(locale); 56 if (!locale) 57 sensors_fatal_error(__func__, "Out of memory"); 58 56 59 setlocale(LC_ALL, "C"); 57 60 } -
lm-sensors/trunk/lib/sysfs.c
r5636 r5661 189 189 underscore = strchr(sfname, '_'); 190 190 name = strndup(sfname, underscore - sfname); 191 if (!name) 192 sensors_fatal_error(__func__, "Out of memory"); 193 191 194 break; 192 195 default: 193 196 name = strdup(sfname); 197 if (!name) 198 sensors_fatal_error(__func__, "Out of memory"); 194 199 } 195 200 … … 420 425 all_subfeatures[i].type = sftype; 421 426 all_subfeatures[i].name = strdup(name); 427 if (!all_subfeatures[i].name) 428 sensors_fatal_error(__func__, "Out of memory"); 429 422 430 if (!(sftype & 0x80)) 423 431 all_subfeatures[i].flags |= SENSORS_COMPUTE_MAPPING;
