FIX: Seg Fault in incremental if BBM log detected
Bug detected for imsm metadata. Assembling of array using Incremental switch generate segmentation fault if BBM log is detected. Reason: missing return from Incremental_container if BBM is detected and unnecessary list=NULL assignment. This patch fix the problem and memory leak in this area. Signed-off-by: Krzysztof Wojcik <krzysztof.wojcik@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
c26d78fe04
commit
51cf74194f
|
@ -1471,7 +1471,9 @@ static int Incremental_container(struct supertype *st, char *devname,
|
|||
if (list->array.state & (1<<MD_SB_BBM_ERRORS)) {
|
||||
fprintf(stderr, Name ": BBM log found in metadata. "
|
||||
"Cannot activate array(s).\n");
|
||||
list = NULL;
|
||||
/* free container data and exit */
|
||||
sysfs_free(list);
|
||||
return 2;
|
||||
}
|
||||
|
||||
for (ra = list ; ra ; ra = ra->next) {
|
||||
|
|
Loading…
Reference in New Issue