]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - Monitor.c
Assemble: allow members of containers to be assembled and auto-assembled.
[thirdparty/mdadm.git] / Monitor.c
index 1c190577ab04417473d345ce89047e5896e99674..0e2e6bc7011ceeec31c929c480c74186616299e8 100644 (file)
--- a/Monitor.c
+++ b/Monitor.c
@@ -165,7 +165,10 @@ int Monitor(mddev_dev_t devlist,
        if (devlist == NULL) {
                mddev_ident_t mdlist = conf_get_ident(NULL);
                for (; mdlist; mdlist=mdlist->next) {
-                       struct state *st = malloc(sizeof *st);
+                       struct state *st;
+                       if (mdlist->devname == NULL)
+                               continue;
+                       st = malloc(sizeof *st);
                        if (st == NULL)
                                continue;
                        st->devname = strdup(mdlist->devname);