Blame SOURCES/0014-parted-Fix-crash-with-name-command-and-no-disklabel-.patch

7fd79c
From f5c628dd51c7d77ff939554425159ab6e8aef1c0 Mon Sep 17 00:00:00 2001
7fd79c
From: "Brian C. Lane" <bcl@redhat.com>
7fd79c
Date: Mon, 13 Jul 2015 16:43:11 -0700
7fd79c
Subject: [PATCH] parted: Fix crash with name command and no disklabel
7fd79c
 (#1226067)
7fd79c
7fd79c
A typo (the last I think) from commit 7eac058 wasn't properly checking
7fd79c
the result of ped_disk_new so it could crash if there was no disklabel
7fd79c
on the device.
7fd79c
---
7fd79c
 parted/parted.c | 2 +-
7fd79c
 1 file changed, 1 insertion(+), 1 deletion(-)
7fd79c
7fd79c
diff --git a/parted/parted.c b/parted/parted.c
7fd79c
index 2678554..a9426c4 100644
7fd79c
--- a/parted/parted.c
7fd79c
+++ b/parted/parted.c
7fd79c
@@ -860,7 +860,7 @@ do_name (PedDevice** dev, PedDisk** diskp)
7fd79c
 
7fd79c
         if (!*diskp)
7fd79c
                 *diskp = ped_disk_new (*dev);
7fd79c
-        if (!diskp)
7fd79c
+        if (!*diskp)
7fd79c
                 goto error;
7fd79c
 
7fd79c
         if (!command_line_get_partition (_("Partition number?"), *diskp, &part))
7fd79c
-- 
7fd79c
2.4.3
7fd79c