Mike Hwang <[EMAIL PROTECTED]> wrote:
> ==13891== 80 bytes in 4 blocks are definitely lost in loss record 14 of
> 35
> ==13891== at 0x40214E5: malloc (vg_replace_malloc.c:149)
> ==13891== by 0x80D6884: ped_malloc (libparted.c:234)
> ==13891== by 0x81165CB: _disk_sync_part_table (linux.c:2216)
> ==13891== by 0x8116EEC: linux_disk_commit (linux.c:2514)
> ==13891== by 0x80D8B23: ped_disk_commit_to_os (disk.c:445)
>
> int* rets = ped_malloc(sizeof(int) * last); (linux.c:2216)
Thanks.
For reference, what parted command were you running?
If it's not yet done as part of "make check", I'll add it.
Please confirm that this patch fixes it.
>From 793f272c8ef1830aadb57159957235a3f6e33cfa Mon Sep 17 00:00:00 2001
From: Jim Meyering <[EMAIL PROTECTED]>
Date: Wed, 30 Jul 2008 11:10:56 +0200
Subject: [PATCH] linux.c: plug a leak
* libparted/arch/linux.c (_disk_sync_part_table): Free local, "rets".
Reported by Mike Hwang <[EMAIL PROTECTED]>.
---
libparted/arch/linux.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
index 19ddae5..75e709b 100644
--- a/libparted/arch/linux.c
+++ b/libparted/arch/linux.c
@@ -2240,6 +2240,7 @@ _disk_sync_part_table (PedDisk* disk)
}
}
+ free (rets);
free (errnums);
return ret;
}
--
1.6.0.rc1.2.gc4577
_______________________________________________
parted-devel mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/parted-devel