Blame SOURCES/0002-mdadm-Fix-double-free.patch

b33395
From 5ce5a15f0bf007e850e15259bba4f53736605fb2 Mon Sep 17 00:00:00 2001
b33395
From: Lukasz Florczak <lukasz.florczak@linux.intel.com>
b33395
Date: Fri, 25 Mar 2022 12:48:59 +0100
b33395
Subject: [PATCH 02/12] mdadm: Fix double free
b33395
b33395
If there was a size mismatch after creation it would get fixed on grow
b33395
in imsm_fix_size_mismatch(), but due to double free "double free or corruption (fasttop)"
b33395
error occurs and grow cannot proceed.
b33395
b33395
Signed-off-by: Lukasz Florczak <lukasz.florczak@linux.intel.com>
b33395
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
b33395
---
b33395
 super-intel.c | 3 +--
b33395
 1 file changed, 1 insertion(+), 2 deletions(-)
b33395
b33395
diff --git a/super-intel.c b/super-intel.c
b33395
index 5ffa7636..6ff336ee 100644
b33395
--- a/super-intel.c
b33395
+++ b/super-intel.c
b33395
@@ -11783,9 +11783,8 @@ static int imsm_fix_size_mismatch(struct supertype *st, int subarray_index)
b33395
 			st->update_tail = &st->updates;
b33395
 		} else {
b33395
 			imsm_sync_metadata(st);
b33395
+			free(update);
b33395
 		}
b33395
-
b33395
-		free(update);
b33395
 	}
b33395
 	ret_val = 0;
b33395
 exit:
b33395
-- 
b33395
2.31.1
b33395