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

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