]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Grow: make sure 'info' doesn't have confusing data.
authorNeilBrown <neilb@suse.de>
Thu, 10 Mar 2011 04:36:07 +0000 (15:36 +1100)
committerNeilBrown <neilb@suse.de>
Thu, 10 Mar 2011 04:36:07 +0000 (15:36 +1100)
We now test ->reshape_active, but don't set it in a common case.

So just zero out the whole structure to be on the safe side.

Signed-off-by: NeilBrown <neilb@suse.de>
Grow.c

diff --git a/Grow.c b/Grow.c
index 2a414289d864ef05840e62ccf9f16324af295096..7125a40935ee9ad3d7a0c3f531f24a9478b97495 100644 (file)
--- a/Grow.c
+++ b/Grow.c
@@ -1508,6 +1508,7 @@ int Grow_reshape(char *devname, int fd, int quiet, char *backup_file,
                ping_monitor(container);
        }
 
+       memset(&info, 0, sizeof(info));
        info.array = array;
        sysfs_init(&info, fd, NoMdDev);
        strcpy(info.text_version, sra->text_version);