[parted-devel] [PATCH] (amiga_read): Don't leak a partition table buffer.

Jim Meyering jim at meyering.net
Thu May 31 18:36:22 UTC 2007


Here's an incidental little fix.

	* libparted/labels/rdb.c (amiga_read): Free the buffer upon success
	as well as on failure.

Signed-off-by: Jim Meyering <jim at meyering.net>
---
 libparted/labels/rdb.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/libparted/labels/rdb.c b/libparted/labels/rdb.c
index 35ed156..483a292 100644
--- a/libparted/labels/rdb.c
+++ b/libparted/labels/rdb.c
@@ -562,6 +562,7 @@ amiga_read (PedDisk* disk)
 		}
 		ped_constraint_destroy (constraint_exact);
 	}
+	ped_free(partition);
 	return 1;
 }

--
1.5.2.146.gb75c6



More information about the parted-devel mailing list