<!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 &quot;make check&quot; do?<BR>
<BR>
<BR>
On Wed, 2008-07-30 at 11:11 +0200, Jim Meyering wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
Mike Hwang &lt;<A HREF="mailto:Mike.Hwang@iqstor.com.cn">Mike.Hwang@iqstor.com.cn</A>&gt; wrote:

&gt; ==13891== 80 bytes in 4 blocks are definitely lost in loss record 14 of
&gt; 35
&gt; ==13891==    at 0x40214E5: malloc (vg_replace_malloc.c:149)
&gt; ==13891==    by 0x80D6884: ped_malloc (libparted.c:234)
&gt; ==13891==    by 0x81165CB: _disk_sync_part_table (linux.c:2216)
&gt; ==13891==    by 0x8116EEC: linux_disk_commit (linux.c:2514)
&gt; ==13891==    by 0x80D8B23: ped_disk_commit_to_os (disk.c:445)
&gt;
&gt; 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 &quot;make check&quot;, I'll add it.

Please confirm that this patch fixes it.

&gt;From 793f272c8ef1830aadb57159957235a3f6e33cfa Mon Sep 17 00:00:00 2001
From: Jim Meyering &lt;<A HREF="mailto:meyering@redhat.com">meyering@redhat.com</A>&gt;
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, &quot;rets&quot;.
Reported by Mike Hwang &lt;<A HREF="mailto:Mike.Hwang@iqstor.com.cn">Mike.Hwang@iqstor.com.cn</A>&gt;.
---
 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>