]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - Incremental.c
Fix null pointer for incremental in mdadm
[thirdparty/mdadm.git] / Incremental.c
index 09b94b9f58c17d501ddfc10f604d4f7a6331cba5..49a71f72af9513f494c82ce97bc0a4e61d8ce624 100644 (file)
@@ -507,6 +507,9 @@ int Incremental(struct mddev_dev *devlist, struct context *c,
                                    GET_OFFSET | GET_SIZE));
        active_disks = count_active(st, sra, mdfd, &avail, &info);
 
+       if (!avail)
+               goto out_unlock;
+
        journal_device_missing = (info.journal_device_required) && (info.journal_clean == 0);
 
        if (info.consistency_policy == CONSISTENCY_POLICY_PPL)