neil / rpms / libblockdev

Forked from rpms/libblockdev a year ago
Clone

Blame SOURCES/0009-mdraid-Fix-use-after-free.patch

973801
From 658c07e92eff05d99a65f112161ea82da842cd2d Mon Sep 17 00:00:00 2001
973801
From: Vojtech Trefny <vtrefny@redhat.com>
973801
Date: Fri, 25 Sep 2020 14:41:20 +0200
973801
Subject: [PATCH] mdraid: Fix use after free
973801
973801
Another copy-paste error.
973801
---
973801
 src/plugins/mdraid.c | 3 +--
973801
 1 file changed, 1 insertion(+), 2 deletions(-)
973801
973801
diff --git a/src/plugins/mdraid.c b/src/plugins/mdraid.c
973801
index eaf659d3..11067c95 100644
973801
--- a/src/plugins/mdraid.c
973801
+++ b/src/plugins/mdraid.c
973801
@@ -1028,8 +1028,7 @@ BDMDExamineData* bd_md_examine (const gchar *device, GError **error) {
973801
             value++;
973801
             ret->uuid = bd_md_canonicalize_uuid (value, error);
973801
             if (!ret->uuid) {
973801
-                g_prefix_error (error, "Failed to canonicalize MD UUID '%s': ", orig_data);
973801
-                g_free (orig_data);
973801
+                g_prefix_error (error, "Failed to canonicalize MD UUID '%s': ", value);
973801
                 bd_md_examine_data_free (ret);
973801
                 g_strfreev (output_fields);
973801
                 return NULL;
973801
-- 
973801
2.37.1
973801