Blame SOURCES/e2fsprogs-1.45.6-debugfs-fix-double-free-in-realloc-error-path-in-rea.patch

f239de
From 4126c63885388e568ade780e9fed6ede37faf978 Mon Sep 17 00:00:00 2001
f239de
From: Theodore Ts'o <tytso@mit.edu>
f239de
Date: Thu, 21 Jan 2021 16:01:14 -0500
f239de
Subject: [PATCH 16/46] debugfs: fix double free in realloc() error path in
f239de
 read_list()
f239de
Content-Type: text/plain
f239de
f239de
Fixes-Coverity-Bug: 1464575
f239de
Fixes-Coverity-Bug: 1464571
f239de
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
f239de
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
f239de
---
f239de
 debugfs/util.c | 6 ++----
f239de
 1 file changed, 2 insertions(+), 4 deletions(-)
f239de
f239de
diff --git a/debugfs/util.c b/debugfs/util.c
f239de
index 759bb392..091f6f65 100644
f239de
--- a/debugfs/util.c
f239de
+++ b/debugfs/util.c
f239de
@@ -545,10 +545,8 @@ errcode_t read_list(char *str, blk64_t **list, size_t *len)
f239de
 			goto err;
f239de
 		}
f239de
 		l = realloc(lst, sizeof(blk64_t) * (ln + y - x + 1));
f239de
-		if (l == NULL) {
f239de
-			retval = ENOMEM;
f239de
-			goto err;
f239de
-		}
f239de
+		if (l == NULL)
f239de
+			return ENOMEM;
f239de
 		lst = l;
f239de
 		for (; x <= y; x++)
f239de
 			lst[ln++] = x;
f239de
-- 
f239de
2.35.1
f239de