FIX: Prevent using null list pointer
When not all attributes are supported (attributes incompatibility) function container_content_imsm returns NULL pointer. We need to cope with a NULL list better. Reported-by: Lukasz Dorau <lukasz.dorau@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
ba71445069
commit
75c2df6509
|
@ -1464,7 +1464,7 @@ static int Incremental_container(struct supertype *st, char *devname,
|
|||
fprintf(stderr, Name ": failed to get exclusive lock on "
|
||||
"mapfile\n");
|
||||
/* do not assemble arrays that might have bad blocks */
|
||||
if (list->array.state & (1<<MD_SB_BBM_ERRORS)) {
|
||||
if (list && list->array.state & (1<<MD_SB_BBM_ERRORS)) {
|
||||
fprintf(stderr, Name ": BBM log found in metadata. "
|
||||
"Cannot activate array(s).\n");
|
||||
/* free container data and exit */
|
||||
|
|
Loading…
Reference in New Issue