<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.18.1">
</HEAD>
<BODY>
I run command mkpart.<BR>
The patch works.<BR>
<BR>
One question, what does "make check" do?<BR>
<BR>
<BR>
On Wed, 2008-07-30 at 11:11 +0200, Jim Meyering wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
Mike Hwang <<A HREF="mailto:Mike.Hwang@iqstor.com.cn">Mike.Hwang@iqstor.com.cn</A>> 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 <<A HREF="mailto:meyering@redhat.com">meyering@redhat.com</A>>
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 <<A HREF="mailto:Mike.Hwang@iqstor.com.cn">Mike.Hwang@iqstor.com.cn</A>>.
---
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
</PRE>
</BLOCKQUOTE>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
<PRE>
--
Mike Hwang
<A HREF="http://www.iqstor.com">http://www.iqstor.com</A>
Phone: 62974477-612
</PRE>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>