From 0f121ea55d996f6149c465e7e5cf94c596a448a5 Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Wed, 16 Apr 2014 18:18:38 -0700 Subject: [PATCH 97/99] libparted: Fix part dupe with empty name It was setting the original translated_name to 0, not the new copy. * libparted/labels/gpt.c (gpt_partition_duplicate): fix empty name --- libparted/labels/gpt.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libparted/labels/gpt.c b/libparted/labels/gpt.c index 6eff38a..31f6d17 100644 --- a/libparted/labels/gpt.c +++ b/libparted/labels/gpt.c @@ -1414,9 +1414,11 @@ gpt_partition_duplicate (const PedPartition *part) goto error_free_part; *result_data = *part_data; - if (part_data->translated_name) + if (part_data->translated_name) { result_data->translated_name = xstrdup (part_data->translated_name); - else part_data->translated_name = 0; + } else { + result_data->translated_name = 0; + } return result; error_free_part: -- 1.9.0