]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - Incremental.c
IncrementalScan(): Make sure 'st' is valid before dereferencing it
[thirdparty/mdadm.git] / Incremental.c
index 87d91140494dbb35d7f87a59954c6bd87cda0ba9..33c0d7fffc67f770a4b9f5d5ad9f633152acdf87 100644 (file)
@@ -1354,7 +1354,7 @@ restart:
                        if (st && st->ss->load_container)
                                ret = st->ss->load_container(st, mdfd, NULL);
                        close(mdfd);
-                       if (!ret && st->ss->container_content) {
+                       if (!ret && st && st->ss->container_content) {
                                if (map_lock(&map))
                                        pr_err("failed to get exclusive lock on mapfile\n");
                                ret = Incremental_container(st, me->path, c, only);