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

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