Solomon Alan-Dei has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/68986 )
Change subject: util/cbfstool/bpdt_formats: Fix memory leak issues ......................................................................
util/cbfstool/bpdt_formats: Fix memory leak issues
The functions create_bpdt_hdr and create_cse_layout in bpdt_1_6.c are defined to return pointers but not integers as was previouly implemented.
Found-by: Coverity(CID:1469323) Found-by: Coverity(CID:1469353)
Signed-off-by: Solomon Alan-Dei alandei.solomon@gmail.com Change-Id: Idb78d94be7a75a25ad954f062e9e52b1f0b921dc --- M util/cbfstool/bpdt_formats/bpdt_1_6.c 1 file changed, 19 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/86/68986/1
diff --git a/util/cbfstool/bpdt_formats/bpdt_1_6.c b/util/cbfstool/bpdt_formats/bpdt_1_6.c index b894936..c5cedd3 100644 --- a/util/cbfstool/bpdt_formats/bpdt_1_6.c +++ b/util/cbfstool/bpdt_formats/bpdt_1_6.c @@ -69,7 +69,7 @@ h->fit_tool_version.build = 0; h->fit_tool_version.hotfix = 0;
- return 0; + return h; }
static void print_bpdt_hdr(const bpdt_hdr_ptr ptr) @@ -159,7 +159,7 @@ l->bp3_size = r[BP3].size; l->checksum = 0; /* unused */
- return 0; + return l; }
static void print_cse_layout(const cse_layout_ptr ptr)