diff options
author | NeilBrown <neilb@suse.de> | 2011-09-07 12:45:24 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2011-09-07 12:45:24 +1000 |
commit | 75c2df6509391e28257d696815bddb854a8c4a94 (patch) | |
tree | 785b344b3362f782de87c39b19fd25a49e44dc26 /Incremental.c | |
parent | ba714450698a966d184f5337235b100cbfa8685e (diff) |
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>
Diffstat (limited to 'Incremental.c')
-rw-r--r-- | Incremental.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Incremental.c b/Incremental.c index 951c2a07..09cdd9b4 100644 --- a/Incremental.c +++ b/Incremental.c @@ -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 */ |