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:
Joel Sherrill
2010-01-19 23:47:41 +00:00
parent e00381a574
commit b61ad658f1
2 changed files with 9 additions and 1 deletions

View File

@@ -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

View File

@@ -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, &sector);
if (rc != RTEMS_SUCCESSFUL)
{
if (sector)
free(sector);
return rc;
}
if (!msdos_signature_check(sector))
{
free(sector);
return RTEMS_INTERNAL_ERROR;
}