summaryrefslogtreecommitdiffstats
path: root/cpukit/libblock
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2010-01-19 23:47:41 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2010-01-19 23:47:41 +0000
commitb61ad658f1d5e48445e601e99234289d27043c33 (patch)
treec7df104032d31f0408d3870d1d64c4c8a83653ca /cpukit/libblock
parent2010-01-19 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-b61ad658f1d5e48445e601e99234289d27043c33.tar.bz2
2010-01-19 Joel Sherrill <joel.sherrill@oarcorp.com>
* libblock/src/ide_part_table.c: Another error path without a free(sector).
Diffstat (limited to 'cpukit/libblock')
-rw-r--r--cpukit/libblock/src/ide_part_table.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/cpukit/libblock/src/ide_part_table.c b/cpukit/libblock/src/ide_part_table.c
index c11660b7b6..f9a942c510 100644
--- a/cpukit/libblock/src/ide_part_table.c
+++ b/cpukit/libblock/src/ide_part_table.c
@@ -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;
}