This is trivial:

        * parted/ui.c (non_interactive_mode): Plug a tiny leak.
        Exercise by running the following with a CD-ROM in the drive:
        valgrind --leak-check=full parted/parted /dev/cdrom print
        Before, we'd leak the 6-byte command: "print\0".

diff --git a/parted/ui.c b/parted/ui.c
index 6bf770a..59cb98b 100644
--- a/parted/ui.c
+++ b/parted/ui.c
@@ -1511,6 +1511,7 @@ non_interactive_mode (PedDevice** dev, Command* 
cmd_list[],
                         break;

                 cmd = command_get (commands, word);
+                free (word);
                 if (!cmd) {
                         help_msg ();
                         goto error;

_______________________________________________
parted-devel mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/parted-devel

Reply via email to