OSDN Git Service
(root)
/
android-x86
/
external-parted.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6cc8f33
)
* parted/ui.c (non_interactive_mode): Plug a tiny leak.
author
Jim Meyering
<jim@meyering.net>
Thu, 8 Mar 2007 21:39:33 +0000
(22:39 +0100)
committer
Jim Meyering
<jim@meyering.net>
Thu, 8 Mar 2007 21:39:33 +0000
(22:39 +0100)
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
patch
|
blob
|
history
diff --git
a/parted/ui.c
b/parted/ui.c
index
6bf770a
..
59cb98b
100644
(file)
--- 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;