[PATCH] Corrected memory leak when displaying partition flags.
Matt Davis
mattdavis9 at gmail.com
Tue Apr 29 02:28:49 UTC 2008
Deallocated memory allocated by partition_print_flags()
---
parted/parted.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/parted/parted.c b/parted/parted.c
index 723e8eb..a0fc2fd 100644
--- a/parted/parted.c
+++ b/parted/parted.c
@@ -1284,6 +1284,7 @@ do_print (PedDevice** dev)
char* size;
const char* name;
char* tmp;
+ char* flags;
wchar_t* table_rendered;
disk = ped_disk_new (*dev);
@@ -1483,7 +1484,9 @@ do_print (PedDevice** dev)
str_list_append (row, name);
}
- str_list_append (row, partition_print_flags (part));
+ flags = partition_print_flags (part);
+ str_list_append (row, flags);
+ ped_free (flags);
} else {
if (has_extended)
str_list_append (row, "");
--
1.5.1.5
--mP3DRpeJDSE+ciuQ--
More information about the parted-devel
mailing list