diff options
author | Brian C. Lane <bcl@redhat.com> | 2014-06-11 12:13:48 -0700 |
---|---|---|
committer | Phillip Susi <psusi@ubuntu.com> | 2014-06-15 14:25:53 -0400 |
commit | 06241515a818dcf62e7c5728a8328cf165e3a793 (patch) | |
tree | b93a4da10891713e28c322e911599b7c0efeed7d /libparted | |
parent | 1da239e2ebd260efa1b9dce9e19127b6bd4bb906 (diff) | |
download | parted-06241515a818dcf62e7c5728a8328cf165e3a793.tar.gz |
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
Diffstat (limited to 'libparted')
-rw-r--r-- | libparted/labels/gpt.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libparted/labels/gpt.c b/libparted/labels/gpt.c index 2a08a50..d69377a 100644 --- a/libparted/labels/gpt.c +++ b/libparted/labels/gpt.c @@ -1407,9 +1407,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: |