When mdadm falls in "reduce size" error on takeovered array it jumps
to release and tries execute backward takeover. This time sra pointer
is not initialized and coredump is generated.
Signed-off-by: Adam Kwolek <adam.kwolek@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
unsigned long cache;
unsigned long long array_size;
int done;
- struct mdinfo *sra;
+ struct mdinfo *sra = NULL;
msg = analyse_change(info, &reshape);
if (msg) {
sra = sysfs_read(fd, 0,
GET_COMPONENT|GET_DEVS|GET_OFFSET|GET_STATE|GET_CHUNK|
GET_CACHE);
-
if (!sra) {
fprintf(stderr, Name ": %s: Cannot get array details from sysfs\n",
devname);