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 /policy.c | |
parent | ba714450698a966d184f5337235b100cbfa8685e (diff) | |
download | mdadm-75c2df6509391e28257d696815bddb854a8c4a94.tar.gz |
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 'policy.c')
-rw-r--r-- | policy.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -678,6 +678,8 @@ struct domainlist *domain_from_array(struct mdinfo *mdi, const char *metadata) { struct domainlist *domlist = NULL; + if (!mdi) + return NULL; for (mdi = mdi->devs ; mdi ; mdi = mdi->next) domainlist_add_dev(&domlist, makedev(mdi->disk.major, mdi->disk.minor), |