From 29b59ca5c3b8d9c0385efbed232a9820ed9fe58e Mon Sep 17 00:00:00 2001 From: Jes Sorensen Date: Thu, 3 Nov 2011 08:09:19 +1100 Subject: [PATCH] unblock_monitor(): Check sra is valid before dereferencing Signed-off-by: Jes Sorensen Signed-off-by: NeilBrown --- msg.c | 2 ++ 1 file changed, 2 insertions(+) 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)) -- 2.39.2