[Parted-commits] GNU Parted Official Repository: Changes to 'master'

Otavio Salvador otavio at alioth.debian.org
Tue Apr 29 17:39:55 UTC 2008


 parted/parted.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit fcbf070239dc590db6a2aaf9d9e3608d2ff45204
Author: Matt Davis <mattdavis9 at gmail.com>
Date:   Mon Apr 28 22:28:49 2008 -0400

    Corrected memory leak when displaying partition flags.
    
    Deallocated memory allocated by partition_print_flags()

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, "");



More information about the Parted-commits mailing list