Changeset 4635 for lm-sensors/trunk/lib/sysfs.c
- Timestamp:
- 07/21/07 10:40:26 (5 years ago)
- Files:
-
- 1 modified
-
lm-sensors/trunk/lib/sysfs.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lm-sensors/trunk/lib/sysfs.c
r4337 r4635 22 22 23 23 #include <string.h> 24 #include <stdlib.h> 24 25 #include <limits.h> 25 26 #include <errno.h> … … 84 85 85 86 if ((bus_attr = sysfs_open_attribute(bus_path))) { 86 if (sysfs_read_attribute(bus_attr)) 87 return -SENSORS_ERR_PARSE; 87 if (sysfs_read_attribute(bus_attr)) { 88 sysfs_close_attribute(bus_attr); 89 goto exit_free; 90 } 88 91 89 92 if (bus_attr->value … … 102 105 entry.name.bus = SENSORS_CHIP_NAME_BUS_PCI; 103 106 } else 104 return -SENSORS_ERR_PARSE;107 goto exit_free; 105 108 106 109 sensors_add_proc_chips(&entry); 107 110 108 111 return 0; 112 113 exit_free: 114 free(entry.name.prefix); 115 free(entry.name.busname); 116 return -SENSORS_ERR_PARSE; 109 117 } 110 118
