forked from Imagelibrary/rtems
2010-01-19 Joel Sherrill <joel.sherrill@oarcorp.com>
Coverity Id 25 * libblock/src/ide_part_table.c: Add free(sector) on error return path to fix leak.
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
2010-01-19 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
Coverity Id 25
|
||||
* libblock/src/ide_part_table.c: Add free(sector) on error return path
|
||||
to fix leak.
|
||||
|
||||
2010-01-19 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
Coverity Id 5
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user