Remove getinfo_super_n and do some other cleaning up.
[thirdparty/mdadm.git] / util.c
diff --git a/util.c b/util.c
index 3a5daa2..4cecd6d 100644 (file)
--- a/util.c
+++ b/util.c
@@ -858,6 +858,8 @@ struct supertype *dup_super(struct supertype *orig)
 {
        struct supertype *st;
 
+       if (!orig)
+               return orig;
        st = malloc(sizeof(*st));
        if (!st)
                return st;