forked from Imagelibrary/rtems
2010-01-19 Joel Sherrill <joel.sherrill@oarcorp.com>
* libblock/src/ide_part_table.c: Another error path without a free(sector).
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2010-01-19 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* libblock/src/ide_part_table.c: Another error path without a
|
||||
free(sector).
|
||||
|
||||
2010-01-19 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
Coverity Id 28
|
||||
|
||||
@@ -223,7 +223,7 @@ read_extended_partition(uint32_t start, rtems_part_desc_t *ext_part)
|
||||
{
|
||||
int i;
|
||||
dev_t dev;
|
||||
rtems_sector_data_t *sector;
|
||||
rtems_sector_data_t *sector = NULL;
|
||||
uint32_t here;
|
||||
uint8_t *data;
|
||||
rtems_part_desc_t *new_part_desc;
|
||||
@@ -244,11 +244,14 @@ read_extended_partition(uint32_t start, rtems_part_desc_t *ext_part)
|
||||
rc = get_sector(dev, here, §or);
|
||||
if (rc != RTEMS_SUCCESSFUL)
|
||||
{
|
||||
if (sector)
|
||||
free(sector);
|
||||
return rc;
|
||||
}
|
||||
|
||||
if (!msdos_signature_check(sector))
|
||||
{
|
||||
free(sector);
|
||||
return RTEMS_INTERNAL_ERROR;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user