I've just pushed this comment-adding change:

>From 15dd1d78b8a884014d658361416e2cf42602268e Mon Sep 17 00:00:00 2001
From: Jim Meyering <[email protected]>
Date: Thu, 29 Oct 2009 12:22:25 +0100
Subject: [PATCH] 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.
---
 libparted/disk.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

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))
--
1.6.5.2.375.g164f1

_______________________________________________
parted-devel mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/parted-devel

Reply via email to