Always initialise a struct super_type to zero
[thirdparty/mdadm.git] / super-intel.c
index 8ca491b..263e398 100644 (file)
@@ -157,6 +157,7 @@ static struct supertype *match_metadata_desc_imsm(char *arg)
                return NULL;
 
        st = malloc(sizeof(*st));
+       memset(st, 0, sizeof(*st));
        st->ss = &super_imsm;
        st->max_devs = IMSM_MAX_DEVICES;
        st->minor_version = 0;
@@ -175,6 +176,7 @@ static struct supertype *match_metadata_desc_imsm_volume(char *arg)
                return NULL;
 
        st = malloc(sizeof(*st));
+       memset(st, 0, sizeof(*st));
        st->ss = &super_imsm_volume;
        st->max_devs = IMSM_MAX_DEVICES;
        st->minor_version = 0;