]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - Assemble.c
Avoid possible null dereference in Assemble.
[thirdparty/mdadm.git] / Assemble.c
index c7cc385da98d6b1e9a26d8531e08a4cd573eb8c7..862120326d62a352fd75d7cc78be83872dfc775f 100644 (file)
@@ -315,7 +315,8 @@ int Assemble(struct supertype *st, char *mddev, int mdfd,
                if (!tst || !tst->sb) {
                        fprintf(stderr, Name ": %s has no superblock - assembly aborted\n",
                                devname);
-                       st->ss->free_super(st);
+                       if (st)
+                               st->ss->free_super(st);
                        return 1;
                }