projects
/
platform
/
upstream
/
syslinux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9ded459
)
elflink: Fix the wrong malloc size in enter_cmdline
author
Liu Aleaxander
<Aleaxander@gmail.com>
Tue, 15 Mar 2011 20:24:57 +0000
(20:24 +0000)
committer
Matt Fleming
<matt.fleming@linux.intel.com>
Tue, 15 Mar 2011 21:14:27 +0000
(21:14 +0000)
Signed-off-by: Liu Aleaxander <Aleaxander@gmail.com>
Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
com32/elflink/ldlinux/cli.c
patch
|
blob
|
history
diff --git
a/com32/elflink/ldlinux/cli.c
b/com32/elflink/ldlinux/cli.c
index
77d32cd
..
b35e958
100644
(file)
--- a/
com32/elflink/ldlinux/cli.c
+++ b/
com32/elflink/ldlinux/cli.c
@@
-369,9
+369,8
@@
void process_command(const char *cmd, bool history)
if (history) {
struct cli_command *comm;
- comm = (struct cli_command *)malloc(sizeof(struct cli_command *));
- comm->command =
- (char *)malloc(sizeof(char) * (strlen(cmd) + 1));
+ comm = malloc(sizeof(struct cli_command));
+ comm->command = malloc(sizeof(char) * (strlen(cmd) + 1));
strcpy(comm->command, cmd);
list_add(&(comm->list), &cli_history_head);
}