Changeset 4635
- Timestamp:
- 07/21/07 10:40:26 (1 year ago)
- Files:
-
- lm-sensors/trunk/CHANGES (modified) (1 diff)
- lm-sensors/trunk/lib/sysfs.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
lm-sensors/trunk/CHANGES
r4624 r4635 3 3 4 4 SVN HEAD 5 Library: Fix a memory leak on error 5 6 Module i2c-piix4: Add ATI SB700 support (2.6 backport) 7 6 8 7 9 2.10.4 (20070716) 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
