mdadm: Fix double free

If there was a size mismatch after creation it would get fixed on grow
in imsm_fix_size_mismatch(), but due to double free "double free or corruption (fasttop)"
error occurs and grow cannot proceed.

Signed-off-by: Lukasz Florczak <lukasz.florczak@linux.intel.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
This commit is contained in:
Lukasz Florczak 2022-03-25 12:48:59 +01:00 committed by Jes Sorensen
parent f1cc8ab9ab
commit 5ce5a15f0b
1 changed files with 1 additions and 2 deletions

View File

@ -11783,9 +11783,8 @@ static int imsm_fix_size_mismatch(struct supertype *st, int subarray_index)
st->update_tail = &st->updates;
} else {
imsm_sync_metadata(st);
free(update);
}
free(update);
}
ret_val = 0;
exit: