From 74c0343d822e00aaca5fc2acd5ef29dced2e10f5 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Thu, 8 Mar 2007 22:39:33 +0100 Subject: [PATCH] * 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". --- parted/ui.c | 1 + 1 file changed, 1 insertion(+) 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; -- 2.11.0