neil / rpms / libblockdev

Forked from rpms/libblockdev a year ago
Clone
Blob Blame History Raw
From 658c07e92eff05d99a65f112161ea82da842cd2d Mon Sep 17 00:00:00 2001
From: Vojtech Trefny <vtrefny@redhat.com>
Date: Fri, 25 Sep 2020 14:41:20 +0200
Subject: [PATCH] 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 eaf659d3..11067c95 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