diff options
author | Shaik Shahina <shahina.shaik@intel.com> | 2022-11-05 01:07:06 +0530 |
---|---|---|
committer | Martin Roth <martin.roth@amd.corp-partner.google.com> | 2022-11-09 00:26:30 +0000 |
commit | 425413c35f443b422feffaee0d1ef8a091998bb6 (patch) | |
tree | 555aecb273d9fe5838dc2e29384953147fd577d1 /util/cbfstool/cbfstool.c | |
parent | 5c1dcd57ee642a2462d50e7fa45d97ecac5af580 (diff) |
cbfstool: Fix possible memory leak
Handle the possible memory leak scenario.
Foundby=klocwork
BUG=NONE
TEST=Boot to OS on Nivviks
Change-Id: I01c4643d1e671d9bd9971ac6db8031634fffd61e
Signed-off-by: Shaik Shahina <shahina.shaik@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/69220
Reviewed-by: Shahina Shaik <shahina.shaik@intel.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Diffstat (limited to 'util/cbfstool/cbfstool.c')
-rw-r--r-- | util/cbfstool/cbfstool.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/util/cbfstool/cbfstool.c b/util/cbfstool/cbfstool.c index 04b91e51ce..d26c418612 100644 --- a/util/cbfstool/cbfstool.c +++ b/util/cbfstool/cbfstool.c @@ -770,8 +770,8 @@ static int cbfs_add_master_header(void) */ if (param.topswap_size) { if (update_master_header_loc_topswap(&image, h_loc, - header_offset)) - return 1; + header_offset)) + goto done; } ret = maybe_update_metadata_hash(&image); |