]> git.baikalelectronics.ru Git - uboot.git/commit
GPT: fix memory leaks identified by Coverity
authorAlison Chaiken <alison@she-devel.com>
Tue, 26 Sep 2017 14:42:28 +0000 (07:42 -0700)
committerTom Rini <trini@konsulko.com>
Fri, 6 Oct 2017 15:28:19 +0000 (11:28 -0400)
commitd57899ecf2b82780de28a34777aad218677deb86
treecbae450ffee044c82ef8b93a37eeb5fbdaedf189
parent1fb9956f6c1b64eddbf15d76504bda0a20c86c9f
GPT: fix memory leaks identified by Coverity

Create a common exit for most of the error handling code in
do_rename_gpt_parts.   Delete the list elements in disk_partitions
before calling INIT_LIST_HEAD from get_gpt_info() a second time.

The SIZEOF_MISMATCH error is not addressed, since that problem was
already fixed by "GPT: incomplete initialization in
allocate_disk_part".

Signed-off-by: Alison Chaiken <alison@peloton-tech.com>
Reported-by: Coverity (CID: 167222, 167235, 167237)
Reviewed-by: Tom Rini <trini@konsulko.com>
cmd/gpt.c