summaryrefslogtreecommitdiff
path: root/kexec/arch/i386/kexec-bzImage.c
diff options
context:
space:
mode:
Diffstat (limited to 'kexec/arch/i386/kexec-bzImage.c')
-rw-r--r--kexec/arch/i386/kexec-bzImage.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/kexec/arch/i386/kexec-bzImage.c b/kexec/arch/i386/kexec-bzImage.c
index 21c1ddf..825beee 100644
--- a/kexec/arch/i386/kexec-bzImage.c
+++ b/kexec/arch/i386/kexec-bzImage.c
@@ -332,8 +332,8 @@ int do_bzImage_load(struct kexec_info *info,
int bzImage_load(int argc, char **argv, const char *buf, off_t len,
struct kexec_info *info)
{
- const char *command_line = NULL, *append = NULL;
- const char *ramdisk;
+ char *command_line = NULL;
+ const char *ramdisk, *append = NULL;
char *ramdisk_buf;
off_t ramdisk_length;
int command_line_len;
@@ -406,5 +406,6 @@ int bzImage_load(int argc, char **argv, const char *buf, off_t len,
ramdisk_buf, ramdisk_length,
real_mode_entry, debug);
+ free(command_line);
return result;
}