diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index c1d1d8b878..3db881db83 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,9 @@ +2010-01-19 Joel Sherrill + + Coverity Id 25 + * libblock/src/ide_part_table.c: Add free(sector) on error return path + to fix leak. + 2010-01-19 Joel Sherrill Coverity Id 5 diff --git a/cpukit/libblock/src/ide_part_table.c b/cpukit/libblock/src/ide_part_table.c index a93728b7f8..a864e0959f 100644 --- a/cpukit/libblock/src/ide_part_table.c +++ b/cpukit/libblock/src/ide_part_table.c @@ -192,7 +192,7 @@ data_to_part_desc(uint8_t *data, rtems_part_desc_t **new_part_desc) * - FAT type and non-zero */ if (is_extended(part_desc->sys_type) || - ((is_fat_partition(part_desc->sys_type)) && (part_desc->size != 0))) { + ((is_fat_partition(part_desc->sys_type)) && (part_desc->size != 0))) { *new_part_desc = part_desc; } else { @@ -333,6 +333,7 @@ read_mbr(rtems_disk_desc_t *disk_desc) /* check if the partition table structure is MS-DOS style */ if (!msdos_signature_check(sector)) { + free(sector); return RTEMS_INTERNAL_ERROR; }