]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
unblock_monitor(): Check sra is valid before dereferencing
authorJes Sorensen <Jes.Sorensen@redhat.com>
Wed, 2 Nov 2011 21:09:19 +0000 (08:09 +1100)
committerNeilBrown <neilb@suse.de>
Wed, 2 Nov 2011 21:09:19 +0000 (08:09 +1100)
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>
msg.c

diff --git a/msg.c b/msg.c
index 87d3b8d6039b6c17a963d0727c613143135c3791..dc780b3ed4bf6fde03a0e660f89f7c99c1584031 100644 (file)
--- a/msg.c
+++ b/msg.c
@@ -448,6 +448,8 @@ void unblock_monitor(char *container, const int unfreeze)
                        continue;
                sysfs_free(sra);
                sra = sysfs_read(-1, e->devnum, GET_VERSION|GET_LEVEL);
+               if (!sra)
+                       continue;
                if (sra->array.level > 0)
                        to_ping++;
                if (unblock_subarray(sra, unfreeze))