Daniele Forsi (dforsi@gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/6379
-gerrit
commit 93d68ab5491c8de8ff1fc9058829bfd10b733922 Author: Daniele Forsi dforsi@gmail.com Date: Sun Jul 27 12:01:40 2014 +0200
util/cbfstool: free buffer on error path
Fix memory leak found by scan-build from clang version 3.2-11.
Change-Id: Id8f9db46cf42012a0eb0a632c9d83a4eec1989a2 Signed-off-by: Daniele Forsi dforsi@gmail.com --- util/cbfstool/cbfs-mkstage.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/util/cbfstool/cbfs-mkstage.c b/util/cbfstool/cbfs-mkstage.c index 2a92c9f..d795c7c 100644 --- a/util/cbfstool/cbfs-mkstage.c +++ b/util/cbfstool/cbfs-mkstage.c @@ -134,6 +134,7 @@ int parse_elf_to_stage(const struct buffer *input, struct buffer *output, ERROR("Underflow copying out the segment." "File has %zu bytes left, segment end is %zu\n", input->size, (size_t)(phdr[i].p_offset + phdr[i].p_filesz)); + free(buffer); return -1; } memcpy(buffer + (l_start - data_start),