From: Jes Sorensen Date: Wed, 2 Nov 2011 21:09:19 +0000 (+1100) Subject: unblock_monitor(): Check sra is valid before dereferencing X-Git-Tag: mdadm-3.2.3~68 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=29b59ca5c3b8d9c0385efbed232a9820ed9fe58e;p=thirdparty%2Fmdadm.git unblock_monitor(): Check sra is valid before dereferencing Signed-off-by: Jes Sorensen Signed-off-by: NeilBrown --- diff --git a/msg.c b/msg.c index 87d3b8d6..dc780b3e 100644 --- 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))