bug-parted
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH parted 3/6] libparted: Add missing update mode pop in duplicate e


From: Hans de Goede
Subject: [PATCH parted 3/6] libparted: Add missing update mode pop in duplicate error path
Date: Thu, 10 Dec 2009 12:43:15 +0100

From: Joel Granados Moreno <address@hidden>

* libparted/disk.c(ped_disk_duplicate): Add missing update mode
pop call in error path.
---
 libparted/disk.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/libparted/disk.c b/libparted/disk.c
index 7660ee9..d14fe41 100644
--- a/libparted/disk.c
+++ b/libparted/disk.c
@@ -264,8 +264,10 @@ ped_disk_duplicate (const PedDisk* old_disk)
        for (old_part = ped_disk_next_partition (old_disk, NULL); old_part;
             old_part = ped_disk_next_partition (old_disk, old_part)) {
                if (ped_partition_is_active (old_part)) {
-                       if (!_add_duplicate_part (new_disk, old_part))
+                       if (!_add_duplicate_part (new_disk, old_part)){
+                               _disk_pop_update_mode (new_disk);
                                goto error_destroy_new_disk;
+                       }
                }
        }
        _disk_pop_update_mode (new_disk);
-- 
1.6.5.2





reply via email to

[Prev in Thread] Current Thread [Next in Thread]