aboutsummaryrefslogtreecommitdiff
path: root/util/cbfstool/cbfs-mkstage.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/cbfstool/cbfs-mkstage.c')
-rw-r--r--util/cbfstool/cbfs-mkstage.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/util/cbfstool/cbfs-mkstage.c b/util/cbfstool/cbfs-mkstage.c
index 6b80a37dc5..55c81c6ebe 100644
--- a/util/cbfstool/cbfs-mkstage.c
+++ b/util/cbfstool/cbfs-mkstage.c
@@ -31,7 +31,7 @@
#include "common.h"
#include "cbfs.h"
-unsigned int idemp(unsigned int x)
+static unsigned int idemp(unsigned int x)
{
return x;
}
@@ -123,7 +123,8 @@ int parse_elf_to_stage(unsigned char *input, unsigned char **output,
}
if (data_end <= data_start) {
- fprintf(stderr, "E: data ends before it starts. Make sure the ELF file is correct and resides in ROM space.\n");
+ fprintf(stderr, "E: data ends before it starts. Make sure the "
+ "ELF file is correct and resides in ROM space.\n");
exit(1);
}
@@ -175,6 +176,8 @@ int parse_elf_to_stage(unsigned char *input, unsigned char **output,
compress(buffer, data_end - data_start,
(char *)(out + sizeof(struct cbfs_stage)), (int *)&stage->len);
+ free(buffer);
+
*output = out;
if (*location)