summaryrefslogtreecommitdiff
path: root/parted
diff options
context:
space:
mode:
authorBrian C. Lane <bcl@redhat.com>2015-07-13 16:43:11 -0700
committerBrian C. Lane <bcl@redhat.com>2015-07-13 16:50:06 -0700
commitf5c628dd51c7d77ff939554425159ab6e8aef1c0 (patch)
tree1701ed8d8a23eda116d8109aa8541b3083b95afa /parted
parent03e6d18945fecea98aea96544e5dd2a043ef0511 (diff)
downloadparted-f5c628dd51c7d77ff939554425159ab6e8aef1c0.tar.gz
parted: Fix crash with name command and no disklabel (#1226067)
A typo (the last I think) from commit 7eac058 wasn't properly checking the result of ped_disk_new so it could crash if there was no disklabel on the device.
Diffstat (limited to 'parted')
-rw-r--r--parted/parted.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/parted/parted.c b/parted/parted.c
index 2678554..a9426c4 100644
--- a/parted/parted.c
+++ b/parted/parted.c
@@ -860,7 +860,7 @@ do_name (PedDevice** dev, PedDisk** diskp)
if (!*diskp)
*diskp = ped_disk_new (*dev);
- if (!diskp)
+ if (!*diskp)
goto error;
if (!command_line_get_partition (_("Partition number?"), *diskp, &part))