Skip to content
Snippets Groups Projects
Commit 18030d04 authored by Alison Chaiken's avatar Alison Chaiken Committed by Tom Rini
Browse files

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: default avatarAlison Chaiken <alison@peloton-tech.com>
Reported-by: Coverity (CID: 167222, 167235, 167237)
Reviewed-by: default avatarTom Rini <trini@konsulko.com>
parent 7c890f14
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment