[Parted-commits] GNU Parted Official Repository: Changes to 'master'
Jim Meyering
meyering at alioth.debian.org
Thu Dec 10 12:43:28 UTC 2009
libparted/labels/dasd.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit 206497ef8a85a0b56d1b5925c350ad89b40dbdcd
Author: Hans de Goede <hdegoede at redhat.com>
Date: Wed Dec 9 15:38:02 2009 +0100
dasd: fix leak in dasd_free
* libparted/labels/dasd.c (dasd_free): Free disk_specific data.
diff --git a/libparted/labels/dasd.c b/libparted/labels/dasd.c
index 59f1594..f7be5d2 100644
--- a/libparted/labels/dasd.c
+++ b/libparted/labels/dasd.c
@@ -185,8 +185,11 @@ static void
dasd_free (PedDisk* disk)
{
PED_ASSERT(disk != NULL, return);
-
+ /* Don't free disk->disk_specific first, in case _ped_disk_free
+ or one of its eventual callees ever accesses it. */
+ void *p = disk->disk_specific;
_ped_disk_free(disk);
+ free(p);
}
More information about the Parted-commits
mailing list