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