super_intel: imsm_manage_reshape(): Fix potential NULL pointer dereference

If sra == NULL we cannot goto abort, as it would result in calls to
sysfs_set_num() which would dereference sra.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
This commit is contained in:
Jes Sorensen 2016-03-09 14:11:02 -05:00
parent 594dc1b8f0
commit 79a16a9b35
1 changed files with 4 additions and 1 deletions

View File

@ -10521,7 +10521,10 @@ static int imsm_manage_reshape(
int degraded = 0;
int source_layout = 0;
if (!fds || !offsets || !sra)
if (!sra)
return ret_val;
if (!fds || !offsets)
goto abort;
/* Find volume during the reshape */