summaryrefslogtreecommitdiffstats
path: root/src/parti386.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2013-11-01 13:38:06 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2013-11-01 13:38:06 +0100
commit7172224ac4cbe9f4c40db5df505cfe8725108e53 (patch)
tree6b0d5445d46c577975c28b8192c0af39f316d5bc /src/parti386.c
parent9440623c9768c7e235be10ed595149fdb644a911 (diff)
Fix various issues reported by Coverity scan
Diffstat (limited to 'src/parti386.c')
-rw-r--r--src/parti386.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/parti386.c b/src/parti386.c
index e70ccba..13374a6 100644
--- a/src/parti386.c
+++ b/src/parti386.c
@@ -540,7 +540,6 @@ static list_part_t *get_ext_data_i386(disk_t *disk_car, list_part_t *list_part,
log_dos_entry(p);
if(is_extended(p->sys_ind))
{
- partition_next_ext=new_partition;
i386_entry2partition(disk_car, partition_main_ext->part_offset, new_partition, p, STATUS_EXT_IN_EXT,order,verbose,saveheader);
aff_part_buffer(AFF_PART_ORDER|AFF_PART_STATUS,disk_car,new_partition);
if(new_partition->errcode!=BAD_NOERR)
@@ -598,6 +597,8 @@ static list_part_t *get_ext_data_i386(disk_t *disk_car, list_part_t *list_part,
list_part=insert_new_partition(list_part, new_partition, 0, &insert_error);
if(insert_error>0)
free(new_partition);
+ else if(is_extended(p->sys_ind))
+ partition_next_ext=new_partition;
}
}
partition_ext=partition_next_ext;