[PATCH] plug a leak in ped_device_get_constraint
Jim Meyering
meyering at redhat.com
Thu May 29 13:47:21 UTC 2008
* libparted/device.c (ped_device_get_constraint):
512 (224 direct, 288 indirect) bytes in 6 blocks are definitely lost...
malloc (vg_replace_malloc.c:207)
ped_malloc (libparted.c:270)
ped_alignment_new (natmath.c:153)
ped_device_get_constraint (device.c:432)
do_mkpartfs (parted.c:927)
command_run (command.c:139)
non_interactive_mode (ui.c:1540)
main (parted.c:2497)
---
libparted/device.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/libparted/device.c b/libparted/device.c
index ac2a5cd..6595572 100644
--- a/libparted/device.c
+++ b/libparted/device.c
@@ -1,6 +1,6 @@
/*
libparted - a library for manipulating disk partitions
- Copyright (C) 1999 - 2001, 2005, 2007 Free Software Foundation, Inc.
+ Copyright (C) 1999 - 2001, 2005, 2007-2008 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -437,6 +437,7 @@ ped_device_get_constraint (PedDevice* dev)
ped_geometry_new (dev, 0, dev->length),
1, dev->length);
+ free (start_align);
return c;
}
--
1.5.6.rc0.30.g7c3f3
More information about the parted-devel
mailing list