[syslinux:elflink] elflink: Fix the wrong malloc size in enter_cmdline
syslinux-bot for Liu Aleaxander
Aleaxander at gmail.com
Fri Mar 18 11:30:40 PDT 2011
Commit-ID: 97e12159159b793292d1f5708aab6c32f06edce4
Gitweb: http://syslinux.zytor.com/commit/97e12159159b793292d1f5708aab6c32f06edce4
Author: Liu Aleaxander <Aleaxander at gmail.com>
AuthorDate: Tue, 15 Mar 2011 20:24:57 +0000
Committer: Matt Fleming <matt.fleming at linux.intel.com>
CommitDate: Tue, 15 Mar 2011 21:14:27 +0000
elflink: Fix the wrong malloc size in enter_cmdline
Signed-off-by: Liu Aleaxander <Aleaxander at gmail.com>
Signed-off-by: Matt Fleming <matt.fleming at linux.intel.com>
---
com32/elflink/ldlinux/cli.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/com32/elflink/ldlinux/cli.c b/com32/elflink/ldlinux/cli.c
index 77d32cd..b35e958 100644
--- 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);
}
More information about the Syslinux-commits
mailing list