54 lines
1.9 KiB
Diff
54 lines
1.9 KiB
Diff
From 04a8baf87820d8a13926e0b8db5cfa55f9f04420 Mon Sep 17 00:00:00 2001
|
|
From: Vojtech Trefny <vtrefny@redhat.com>
|
|
Date: Fri, 25 Sep 2020 14:26:57 +0200
|
|
Subject: [PATCH 1/2] mdraid: Fix copy-paste error when checking return value
|
|
|
|
---
|
|
src/plugins/mdraid.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/src/plugins/mdraid.c b/src/plugins/mdraid.c
|
|
index 67bdc1f9..48abb72f 100644
|
|
--- a/src/plugins/mdraid.c
|
|
+++ b/src/plugins/mdraid.c
|
|
@@ -995,7 +995,7 @@ BDMDExamineData* bd_md_examine (const gchar *device, GError **error) {
|
|
orig_data = ret->dev_uuid;
|
|
if (orig_data) {
|
|
ret->dev_uuid = bd_md_canonicalize_uuid (orig_data, error);
|
|
- if (!ret->uuid) {
|
|
+ if (!ret->dev_uuid) {
|
|
g_prefix_error (error, "Failed to canonicalize MD UUID '%s': ", orig_data);
|
|
g_free (orig_data);
|
|
bd_md_examine_data_free (ret);
|
|
--
|
|
2.37.1
|
|
|
|
|
|
From 16a34bc5ddb19bc6dd1a845d87e8b748cbaedd2c Mon Sep 17 00:00:00 2001
|
|
From: Vojtech Trefny <vtrefny@redhat.com>
|
|
Date: Fri, 25 Sep 2020 14:41:20 +0200
|
|
Subject: [PATCH 2/2] mdraid: Fix use after free
|
|
|
|
Another copy-paste error.
|
|
---
|
|
src/plugins/mdraid.c | 3 +--
|
|
1 file changed, 1 insertion(+), 2 deletions(-)
|
|
|
|
diff --git a/src/plugins/mdraid.c b/src/plugins/mdraid.c
|
|
index 48abb72f..75143ea7 100644
|
|
--- a/src/plugins/mdraid.c
|
|
+++ b/src/plugins/mdraid.c
|
|
@@ -1028,8 +1028,7 @@ BDMDExamineData* bd_md_examine (const gchar *device, GError **error) {
|
|
value++;
|
|
ret->uuid = bd_md_canonicalize_uuid (value, error);
|
|
if (!ret->uuid) {
|
|
- g_prefix_error (error, "Failed to canonicalize MD UUID '%s': ", orig_data);
|
|
- g_free (orig_data);
|
|
+ g_prefix_error (error, "Failed to canonicalize MD UUID '%s': ", value);
|
|
bd_md_examine_data_free (ret);
|
|
g_strfreev (output_fields);
|
|
return NULL;
|
|
--
|
|
2.37.1
|
|
|