[Parted-commits] GNU Parted Official Repository: Changes to 'next'
Jim Meyering
meyering at alioth.debian.org
Thu Oct 29 11:22:47 UTC 2009
libparted/disk.c | 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit 15dd1d78b8a884014d658361416e2cf42602268e
Author: Jim Meyering <meyering at redhat.com>
Date: Thu Oct 29 12:22:25 2009 +0100
dvh: document an as-yet-unplugged (but not serious) leak
* libparted/disk.c (ped_disk_add_partition): List some of the
things I've tried to plug a leak exposed by a root-only test
on dvh's partition-creation error path. This leak is enough
of a corner case that I may even leave it for now, and add a
suppression for it, so that we're not distracted by it.
diff --git a/libparted/disk.c b/libparted/disk.c
index beb0921..3a02537 100644
--- a/libparted/disk.c
+++ b/libparted/disk.c
@@ -1813,6 +1813,12 @@ ped_disk_add_partition (PedDisk* disk, PedPartition* part,
if (!_partition_align (part, constraints))
goto error;
}
+ /* FIXME: when _check_partition fails, we end up leaking PART
+ at least for DVH partition tables. Simply calling
+ ped_partition_destroy(part) here fixes it for DVH, but
+ causes trouble for other partition types. Similarly,
+ reordering these two checks, putting _check_partition after
+ _disk_raw_add induces an infinite loop. */
if (!_check_partition (disk, part))
goto error;
if (!_disk_raw_add (disk, part))
More information about the Parted-commits
mailing list