]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - msg.c
unblock_monitor(): Check sra is valid before dereferencing
[thirdparty/mdadm.git] / 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))